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了

相关推荐
干到60岁退休的码农35 分钟前
16.过滤器中处理异常响应返回
java·spring boot·mybatis
敲代码的嘎仔1 天前
互动问答系统实战:两级评论模型、ES 搜索集成、Caffeine 多级缓存全记录
java·开发语言·数据库·elasticsearch·缓存·mybatis·高并发
无风听海2 天前
深入解析 Elasticsearch 的 match_phrase_prefix与 match_bool_prefix
大数据·elasticsearch·mybatis
摆烂z2 天前
定时任务同步数据--续跑&重试
java·mybatis·ai编程
Wang's Blog3 天前
Java框架快速入门: Spring Security+OAuth2之实现UserDetails与GrantedAuthority深度定制
java·spring·mybatis
阿维的博客日记4 天前
Example 类全场景实战指南
java·mybatis
阿维的博客日记5 天前
Example API指南2
java·mybatis
霸道流氓气质6 天前
MyBatis 与 SQL 层面关键技术详解
windows·sql·mybatis
₍˄·͈༝·͈˄*₎◞ ̑̑码7 天前
MyBatis操作数据库
数据库·mybatis
干到60岁退休的码农7 天前
13.构建登录接口响应数据
java·spring boot·mybatis