HTTP Status 406 – Not Acceptable

 

 

前端調用這個方法報錯:html

 

 

HTTP Status 406 – Not Acceptable


Type Status Report前端

Description The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.json

方法使用了@ResponseBody來返回json,而後註解 produces="text/html;charset=UTF-8" 又說返回的是 text/html,互相矛盾,去掉註解  produces="text/html;charset=UTF-8"  就行了。3d

相關文章
相關標籤/搜索