運行項目項目后,因為前端用了layui框架,所以頁面顯示接口異常,
 
查看tomcat日志,發現報了這個錯誤,關鍵是我犯了不止一次這個錯誤。所以記下來。
Feb 28, 2019 5:18:39 PM org.apache.catalina.core.ApplicationContext log SEVERE: Servlet.service() for servlet [SpringMVC] in context with path [] threw exception
[Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException:
nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression ''.
Cause: org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression:
[org.apache.ibatis.ognl.ParseException: Encountered "<EOF>" at line 1, column 0. Was expecting one of: ":" ... "not" ... "+" ... "-" ... "~" ... "!" ... "(" ... "true" ... "false" ... "null" ... "#this" ... "#root" ... "#" ... "[" ... "{" ... "@" ... "new" ... <IDENT> ... <DYNAMIC_SUBSCRIPT> ... "\'" ... "`" ... "\"" ... <INT_LITERAL> ... <FLT_LITERAL> ... ]] with root cause org.apache.ibatis.ognl.ParseException: Encountered "<EOF>" at line 1, column 0.
原因是Mapper.xml文件中if判斷條件沒有寫
<if test="">// test="aaa!=null" 不寫報錯 AND LOCATE(#{Parameter},字段)>0
</if>
---恢復內容結束---
