【Mybatis】Mybatis 判断字符串非空和空串 报错, Encountered " "AND “” at line 1
1、Mybatis.xml 代码
2、console 控制台报错
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'username != null AND username != '''. Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression: username != null AND username != '' [org.apache.ibatis.ognl.ParseException: Encountered " <IDENT> "AND "" at line 1, column 18.
Was expecting one of:
3、解决办法
mybatis 中 if判断 的 and 要小写,大写 会报错