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了

相关推荐
煎饼皮皮侠12 小时前
设计一个分页插件之二【基于mybatis实现分页插件】
mybatis·分页插件
czlczl2002092519 小时前
MyBatis-Plus SQL自动填充字段
sql·tomcat·mybatis
独断万古他化20 小时前
【MyBatis-Plus 进阶】注解配置、条件构造器与自定义 SQL的复杂操作详解
sql·mybatis·mybatis-plus·条件构造器
马猴烧酒.1 天前
【JAVA数据传输】Java 数据传输与转换详解笔记
java·数据库·笔记·tomcat·mybatis
962464i2 天前
mybatis-plus生成代码
java·开发语言·mybatis
小信丶2 天前
@MappedJdbcTypes 注解详解:应用场景与实战示例
java·数据库·spring boot·后端·mybatis
palomua2 天前
MyBatis-Plus实体类新增字段导致存量接口报错问题
数据库·mybatis
椎4952 天前
MybatisPlus插件-简化代码开发
mybatis
root666/2 天前
【Java-后端-Mybatis】DISTINCT 作用
数据库·sql·mybatis
墨雨晨曦882 天前
MyBatis框架篇
java·开发语言·mybatis