We develop a standard Java web application using Spring MVC, and have recently tried to upgrade from 3.0.6 to 3.2.0. Nearly of all our servlet responses are JSP or Json views, b
With spring 3.2 it is better resolved using ContentNegotiationManager
. It is working for me. You could use the static field like org.springframework.http.MediaType.APPLICATION_JSON_VALUE
to mention the mediatype. check the following code:
For this you have to use util schema in your dispatcher-servlet.xml file, i.e. xmlns:util="http://www.springframework.org/schema/util"
and schema location http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd