Spring 3.2.x returns JSON data via @responsebody label 406 error: Failed to load resource:the Server responded with a status of 406 (not Ac ceptable) and an error description: The resource identified by this request was only capable of generating
Title, the recent use of spring MVC as a background framework, when the front end asynchronously fetches data (. html is the way to access the suffix name), 406 not acceptable error. Originally did not know what reason, the front and back station
SpringMVC browser accepts the solution of 406 error in json format, springmvcjson
This error is really hard to solve. There is really no good solution for the first meeting. I found a lot of information on the Internet and tried it one by one.
This error is really difficult to engage in, the first encounter there is really no good way to solve, the Internet to find a lot of information, one by one tried also can not be a good solution, finally through friends, colleagues work together,
With SPSRINGMVC, using Resteasy debugging, the controller request is set as follows:Java code
@RequestMapping (value="/list", Method=requestmethod.get,produces=mediatype.application_json_value)
@ResponseBody
Public list List () {
HTTP error Code table all HTTP status codes and their definitions.Code indication2XX success200 normal; The request is complete.201 Normal; Immediately after the POST command.202 normal; Accepted for processing, but processing is not yet complete.203
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.