Reputation: 37078
I use spring mvc
I have controller for rest web service
Sometimes I want to returns xml, Sometimes - json. In classPath I have and jackson and jaxb
How I can switch between them?
Upvotes: 0
Views: 67
Reputation: 5995
You'll need ContentNegotiatingViewResolver. Please check Spring documentation on the matter especially the Returning multiple representations section.
Upvotes: 0