解决 There is no getter for property named ‘null‘ in ‘class 报错
报错内容: Resolved [org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘null’ in ‘class com.tmeone.erpo
·
报错内容:
Resolved [org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named ‘null’ in ‘class com.tmeone.erpone.entity.TLogistics’]
报错原因:
在使用MyBatis-plus自带的删除和更新方法时,它都是通过ID来进行删除和更新,而我们的实体类没有id这个字段。
解决方案:
在我们的实体类主键字段上加一个@TableId注解
如果实体类主键属性名为id无需加此注解
更多推荐
已为社区贡献1条内容
所有评论(0)