org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'application/json;charset=UTF-8' not supported或其他Content type不支持处理

时间:2021-06-09 18:24:33   收藏:0   阅读:29

Spring显示Content type ‘application/json;charset=UTF-8‘ not supported

 

排查思路

 

1.是否在异步请求有如下设置

contentType:"application/json;charset=utf-8"

 

2.是否导入jackson坐标

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.2</version>
</dependency>

3.是否在Spring的配置文件中配置

<mvc:annotation-driven/>

4.版本冲突(尝试更换fackson等版本)

 

原文:https://www.cnblogs.com/shuiguo/p/14866288.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!