美文网首页
Mybatis:There is no getter for p

Mybatis:There is no getter for p

作者: Sheldonlv | 来源:发表于2019-08-03 20:39 被阅读0次

    在一次demo编写的时候,测试出现了服务器500的报错
    弹出的报错为:There is no getter for property named 'user' in 'class com.sheldon.pojo.User'
    翻译过来大概就是pojo方面跟mybatis之间映射出了问题,比如说数据表与映射的类之间数据字段映射出问题了
    也就是 数据表的字段映射类的变量 无法对应上

    解决办法:

      1. 检查pojo层映射类与数据表字段的名称是否对应上
    • 2.检查@param是否加载正常(用 org.apache.ibatis.annotations.Param 才正确)

    相关文章

      网友评论

          本文标题:Mybatis:There is no getter for p

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