SEVERE: Servlet.service() for servlet [Spring…

2019-03-01 10:14:41来源:博客园 阅读 ()

新老客户大回馈,云服务器低至5折

 

 运行项目项目后,因为前端用了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>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

---恢复内容结束---


原文链接:https://www.cnblogs.com/nkk20191101/p/10452256.html
如有疑问请与原作者联系

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Java线程分析

下一篇:Spring Boot使用注解实现AOP