前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression

org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression

作者头像
程序员十三
发布2018-03-15 14:56:46
4.5K0
发布2018-03-15 14:56:46
举报
文章被收录于专栏:程序员有故事程序员有故事

前言

本文中提到的解决方案,源码地址在:springboot-thymeleaf,希望可以帮你解决问题。

本文中涉及的两个异常为我开发时遇到的,可能和你目前所要处理的bug不同,如果不是同一个问题,希望再找找其他文章。

异常

Exception evaluating SpringEL expression这个异常的出现应该有很多原因引起,本文中涉及的两个异常分别为:

  • 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

解决方案

  • 异常1 :
代码语言:javascript
复制
Attempted to call method on null context object

调用的方法处于一个空对象中,即调用实例为空。

解决方案可以参考我的这篇文章:Method call: Attempted to call method test() on null context object

  • 异常2 :
代码语言:javascript
复制
Method cannot be found

方法不存在

解决方案可以参考我的这篇文章:Method service() cannot be found on com.my.blog.springboot.thymeleaf.util.MethodTest type

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 前言
  • 异常
  • 解决方案
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档