当前位置: 移动技术网 > IT编程>开发语言>Java > SEVERE: Servlet.service() for servlet [SpringMVC] in context with path [] threw exception ........

SEVERE: Servlet.service() for servlet [SpringMVC] in context with path [] threw exception ........

2019年03月01日  | 移动技术网IT编程  | 我要评论

 

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网