Ajax http406

<mvc:annotation-driven content-negotiation-manager="contentNegotiationManager" /> 

<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"> 

<property name="favorPathExtension" value="false" />

<property name="favorParameter" value="false" /> 

<property name="ignoreAcceptHeader" value="false" /> 

<property name="mediaTypes" > 

<value>

atom=application/atom+xml

html=text/html

json=application/json

*=*/*

</value> 

</property>

</bean>

相关推荐