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了

相关推荐
从此以后自律1 天前
MyBatis-Plus 内置分页、PageHelper 自定义分页
mybatis
4154111 天前
MyBatis-Plus + PostGIS 实战(1.1):Geometry 字段在 Swagger 中的优雅展示
java·mybatis·postgis
4154112 天前
MyBatis-Plus + PostGIS 实战一(基础篇)
java·mybatis·postgis
Wang's Blog2 天前
Java框架快速入门:深入MyBatis-Plus高级DML操作(ID策略·逻辑删除·乐观锁)
java·数据库·mybatis
丑八怪大丑3 天前
MyBatis
mybatis
从此以后自律3 天前
MyBatis 与 MyBatis-Plus 完整对比讲解
mybatis
SQL-First布道者3 天前
Spring JDBC Ultra 十边型战士
java·spring boot·后端·mysql·spring·mybatis
han_hanker4 天前
sql语法 MyBatis <foreach> 标签详解
windows·sql·mybatis
ByWalker_5 天前
web应用技术—MyBatis入门
java·数据库·mybatis·lombok
ylscode6 天前
Cloudflare Workers Cache 深度解析:边缘缓存如何重塑无服务器性能边界
java·spring·mybatis