当前位置: 代码迷 >> 综合 >> org.apache.ibatis.ognl.ParseException: Encountered shr--异常7
  详细解决方案

org.apache.ibatis.ognl.ParseException: Encountered shr--异常7

热度:0   发布时间:2024-01-17 06:26:39.0

情景:保存数据的时候报错,解决后在此记录一下

如下:

Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression 'shr ! = ''and  shr !=null'. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: 'shr ! = ''and  shr !=null'[org.apache.ibatis.ognl.ParseException: Encountered " "shr"
Was expecting one of:<EOF> "," ..."=" ..."?" ..."||" ..."or" ..."&&" ..."and" ..."shr" ...

原因:shr在实体bean是审核人意思 但是这个字段是在mybatis中认为是关键字

解决办法:  把shr改成其它变量就行啦   晕的不行,建议最好不要用拼音 不规范  掉进坑了还一脸闷逼

ok 就到这里啦

  

 

  相关解决方案