mybatis踩坑值 <if test=> 不能用大写AND

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression ' VIP == 0 AND isVipOpen!=0 '. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: VIP == 0 AND isVipOpen!=0 [org.apache.ibatis.ognl.ParseException: Encountered " <IDENT> "AND "" at line 1, column 11.

Was expecting one of:

<EOF>

"," ...

"=" ...

"?" ...

"||" ...

"or" ...

"&&" ...

"and" ...

"|" ...

"bor" ...

"^" ...

"xor" ...

"&" ...

"band" ...

"==" ...

"eq" ...

"!=" ...

"neq" ...

"<" ...

"lt" ...

">" ...

"gt" ...

"<=" ...

"lte" ...

">=" ...

"gte" ...

"in" ...

"not" ...

"<<" ...

"shl" ...

">>" ...

"shr" ...

">>>" ...

"ushr" ...

"+" ...

"-" ...

"*" ...

"/" ...

"%" ...

"instanceof" ...

"." ...

"(" ...

"[" ...

<DYNAMIC_SUBSCRIPT> ...

]

test中AND改成小写就OK了

相关推荐
凯酱2 小时前
MyBatis 中 OGNL 的使用:从入门到实战
java·tomcat·mybatis
蓝缘21 小时前
解决main No MyBatis mapper was found in 的警告
mybatis
luteres1 天前
Mybatis+SSM整合笔记
java·开发语言·mybatis
晚染烟1 天前
每日八股day31
mybatis
MetaLite2 天前
MyBatis复杂SQL很灵活-自研ORM为何仍要保留SQL逃生口
java·mybatis
步行cgn3 天前
MyBatis 实现分页查询
mybatis
山甫aa3 天前
Javaweb---MyBatis增删改查
java·数据库·后端·mybatis·springboot
choumou_M3 天前
SpringBoot_2:MyBatis-Generator插件使用教程
spring boot·tomcat·mybatis
SQL-First布道者3 天前
全面解构传统持久层框架,拥抱真正的 SQL-First
java·数据库·spring boot·sql·spring·mybatis·spring jdbc