SpringMVC project 406 error:
When a data request returns json
tomcat given
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request “accept” headers.
Chinese explanation:
resource identified by the request is only capable of generating a "accept" response header unacceptable characteristics according to the request.
Reason: * .html request may not be returned in the springmvc json data.
For these reasons, we can use some Solutions,
1. json jar package is not installed.
Look json file has no dependencies, if not, pom file to the jar package
<!-- Jackson Json处理工具包 -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
2. Request URL ends in .html. (Modify web.xml, add url interception format.)
Change in place js-generation request to .action ending
accepted on request web.xml plus .action