The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.
意思是请求不被接受。出现这种情况一般都是用了@ResponseBody注解,而springMVC中返回值类型转换器配置有问题
- <bean id="contentNegotiationManagerFactoryBean"
- class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
- <property name="favorPathExtension" value="true"/><!--匹配后缀-->
- <property name="favorParameter" value="false"/>
- <property name="ignoreAcceptHeader" value="false"/>
- <property name="mediaTypes">
- <map>
- <entry key="json" value="application/json"/>
- </map>
- </property>
- </bean>