SEVERE: Servlet.service() for servlet [SpringMVC] in context with path [] threw exception ........
程序员文章站
2022-04-06 12:40:40
运行项目项目后,因为前端用了layui框架,所以页面显示接口异常, 查看tomcat日志,发现报了这个错误,关键是我犯了不止一次这个错误。所以记下来。 原因是Mapper.xml文件中if判断条件没有写 恢复内容结束 ......
运行项目项目后,因为前端用了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>
---恢复内容结束---
下一篇: 华为数据挖掘方法论及案例介绍
推荐阅读