美文网首页
Spring boot 2.0 @RequestBody 不能传

Spring boot 2.0 @RequestBody 不能传

作者: leeehao | 来源:发表于2018-06-30 17:06 被阅读0次

    偶然间遇到这个无厘头的问题,在一个 request 中传递的 json 字符串包含了 role 关键字,Spring mvc 竟然跳过反序列化,没有深究是 Jackson 还是 Spring boot 的问题,建议开发过程中减少与Spring相关关键字的冲突。
    示例

    {
        "roles:": ["ARTICLE","BANNER"],
        "roleNames": ["ARTICLE","BANNER"]
    }
    

    相关文章

      网友评论

          本文标题:Spring boot 2.0 @RequestBody 不能传

          本文链接:https://www.haomeiwen.com/subject/khztuftx.html