mybatis中字段名与关键字相同问题怎么解决(mybatis,开发技术)

时间:2024-04-30 14:00:23 作者 : 石家庄SEO 分类 : 开发技术
  • TAG :

    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中字段名与关键字相同问题怎么解决

     </div> <div class="zixun-tj-product adv-bottom"></div> </div> </div> <div class="prve-next-news">
    本文:mybatis中字段名与关键字相同问题怎么解决的详细内容,希望对您有所帮助,信息来源于网络。
    上一篇:springboot使用alibaba的druid数据库连接池错误如何解决下一篇:

    7 人围观 / 0 条评论 ↓快速评论↓

    (必须)

    (必须,保密)

    阿狸1 阿狸2 阿狸3 阿狸4 阿狸5 阿狸6 阿狸7 阿狸8 阿狸9 阿狸10 阿狸11 阿狸12 阿狸13 阿狸14 阿狸15 阿狸16 阿狸17 阿狸18