mybatis中字段名与关键字相同

mybatis中字段名与关键字相同问题

在字段上添加反双引号,就是~键;

如图:

mybatis中字段名与关键字相同问题

mybatis关键字于字段名冲突

SHR在我们表里是审核人,但在mybatis字段是表示>>的意思,产生冲突

报错信息:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'shr != null'. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: shr != null [org.apache.ibatis.ognl.ParseException: Encountered " "shr" "shr "" at line 1, column 1.
Was expecting one of:

解决方案

修改shr属性名,添加@TableField注解

mybatis中字段名与关键字相同问题

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持。

原文地址:https://blog.csdn.net/qq_34285939/article/details/86605105

相关文章:

  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-04-12
  • 2021-12-25
  • 2022-12-23
  • 2021-05-23
猜你喜欢
  • 2022-02-08
  • 2021-12-10
  • 2021-06-08
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案