本文中提到的解决方案,源码地址在:springboot-thymeleaf,但愿能够帮你解决问题。html
本文中涉及的两个异常为我开发时遇到的,可能和你目前所要处理的bug不一样,若是不是同一个问题,但愿再找找其余文章。git
Exception evaluating SpringEL expression
这个异常的出现应该有不少缘由引发,本文中涉及的两个异常分别为:github
org.springframework.expression.spel.SpelEvaluationException: EL1004E: Method call: Method service() cannot be found on com.my.blog.springboot.thymeleaf.util.MethodTest type
org.springframework.expression.spel.SpelEvaluationException: EL1011E: Method call: Attempted to call method test() on null context object
Attempted to call method on null context object 调用的方法处于一个空对象中,即调用实例为空。
解决方案能够参考个人这篇文章:Method call: Attempted to call method test() on null context objectspring
Method cannot be found 方法不存在
解决方案能够参考个人这篇文章:Method service() cannot be found on com.my.blog.springboot.thymeleaf.util.MethodTest typeexpress