[mybatis] expression: in.showLayers==true [org.apache.ibatis.ognl.ParseException: Encountered “ “in“

异常

nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'in.showLayerstrue’. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: in.showLayerstrue [org.apache.ibatis.ognl.ParseException: Encountered " “in” "in “” at line 1, column 1.

“,” …
“=” …
“?” …
“||” …
“or” …
“&&” …
“and” …
“|” …
“bor” …
“^” …
“xor” …
“&” …
“band” …
“==” …
“eq” …
“!=” …
“neq” …
“<” …
“lt” …
“>” …
“gt” …
“<=” …
“lte” …
“>=” …
“gte” …
“in” …
“not” …
“<<” …
“shl” …
“>>” …
“shr” …
“>>>” …
“ushr” …
“+” …
“-” …
“*” …
“/” …
“%” …
“instanceof” …
“.” …
“(” …
“[” …
<DYNAMIC_SUBSCRIPT> …
]

解决

由错误提示可知,是ognl表达式

<if test="in.showShelfs == true">
  • 1

出现错误,仔细检查后发现参数in和ognl表达式保留字冲突,修改参数后问题解决。

<if test="inDto.showShelfs == true">
posted @ 2020-12-17 16:17  FZlion  阅读(173)  评论(0编辑  收藏  举报