HTTP Status 406 – Not Acceptable


 

 

前端調用這個方法報錯:

 

 

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.

方法使用了@ResponseBody來返回json,然后注解 produces="text/html;charset=UTF-8" 又說返回的是 text/html,互相矛盾,去掉注解  produces="text/html;charset=UTF-8"  就好了。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM