<beanclass="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"><propertyname="contentNegotiationManager"><beanclass="org.springframework.web.accept.ContentNegotiationManager"><constructor-arg><list><!-- These are evaluated in order --><!-- Is there a media type based on suffix? --><beanclass="org.springframework.web.accept.PathExtensionContentNegotiationStrategy"><constructor-arg><map><entrykey="html"value="text/html"/><entrykey="json"value="application/json"/><entrykey="pdf"value="application/pdf"/></map></constructor-arg></bean><!-- Else use request header --><beanclass="org.springframework.web.accept.HeaderContentNegotiationStrategy"></bean></list></constructor-arg></bean></property>
</bean>