首页 > Web开发 > 详细

HTTP Status 406 – Not Acceptable

时间:2019-09-27 23:09:24      阅读:471      评论:0      收藏:0      [点我收藏+]

技术分享图片

 

 

前端调用这个方法报错:

技术分享图片

 

 

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

 

HTTP Status 406 – Not Acceptable

原文:https://www.cnblogs.com/digdeep/p/11600649.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!