版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_20009015/article/details/84581044
最后在《Spring in Action》里找到一个信息
有两个前提条件:
The request’sContent-Typeheader must be set toapplication/json.
The JacksonJSONlibrary must be available on the application’s classpath.
最最重要的一点!! 如果你确定你发的是json格式的字符串! 不能是json对象或者其他的
那么肯定就是 缺了一个jar包 springmvc的@requesbody需要这个jar包的支持!!
<dependency>
扫描二维码关注公众号,回复:
4306344 查看本文章
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.5.3</version>
</dependency>