今天用springmvc注解response时遇到了这个错误The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers.原因是@RequestMapping(value = "/savaUser",produces="*/*;charset=UTF-8"),produces是告诉返回的格式和编码,如果没有这个参数默认是text/plain;ios-8895-1。返回的格式最好是和请求的格式一样。@RequestMapping(value = "/savaUser",produces="text/plain;charset=UTF-8")
springmvc
最新推荐文章于 2023-04-25 19:37:05 发布