欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

mybatis中字段名與關(guān)鍵字相同問題

 更新時(shí)間:2023年02月27日 16:24:48   作者:qq_34285939  
這篇文章主要介紹了mybatis中字段名與關(guān)鍵字相同問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教

mybatis中字段名與關(guān)鍵字相同

在字段上添加反雙引號(hào),就是~鍵;

如圖:

mybatis關(guān)鍵字于字段名沖突

SHR在我們表里是審核人,但在mybatis字段是表示>>的意思,產(chǎn)生沖突

報(bào)錯(cuò)信息:

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注解

總結(jié)

以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論