HTTP Status 406 – Not Acceptable

HTTP Status 406 – Not Acceptable

 

 

前端调用这个方法报错:

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"  就好了。

 

上一篇:2021-12-12每日一题


下一篇:go报错unimplemented: 64-bit mode not compiled in与mingw 64位安装报错ERROR res已解决