springboot 报错 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported


开始 controller 方法写的是   

    @RequestMapping( value = "/add", method = RequestMethod.POST )

    public String add( @RequestBody Map<String, Object> params ) {  

报错 Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported

改成

    @RequestMapping( value = "/add", method = RequestMethod.POST )

    public String add( @RequestParam Map<String, Object> params ) {

就不报错了。
---------------------
作者:guile
来源:CSDN
原文:https://blog.csdn.net/beguile/article/details/80460957
版权声明:本文为博主原创文章,转载请附上博文链接!


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM