前言

本文中提到的解决方案,源码地址在: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 :
Attempted to call method on null context object

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

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

  • 异常2 :
Method cannot be found

方法不存在

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

org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression的更多相关文章

  1. Exception evaluating SpringEL expression:

    Exception evaluating SpringEL expression:错误 说明: 在帮助同事看BUG的时候遇上了这个问题,不知道是前端还是后端的错误 在网上找了很多文章解决的方法,很多都 ...

  2. org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression:

    org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression:

  3. Layui + thymeleaf org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: " 错误解决

    解决方法: 1.将layui的代码移动到新的js文件当中,用template模板引擎的方式引入: <script th:src="@{/static/js/facility/mover ...

  4. Thymeleaf 异常:Exception processing template "index": An error happened during template parsing (template: "class path resource [templates/index.html]")

    Spring Boot 项目,在 Spring Tool Suite 4, Version: 4.4.0.RELEASE 运行没有问题,将项目中的静态资源和页面复制到 IDEA 的项目中,除了 IDE ...

  5. org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/ template might not exist or might not be accessible by any of the configured

    异常现象:在本地打包部署完全没有问题,资源文件也都可以映射上,但是打包成jar包部署到服务器上时,就一直报异常,异常信息如下: 严重: Servlet.service() for servlet [d ...

  6. spring boot 使用thymeleaf模版 报错:org.thymeleaf.exceptions.TemplateInputException

    错误: org.thymeleaf.exceptions.TemplateInputException: Error resolving template "Hello", tem ...

  7. spring boot + thymeleaf 报错 org.thymeleaf.exceptions.TemplateInputException

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template "admin/verifyPassword ...

  8. org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/home/index2", template might not exist or might not be accessible by any of the configured Template Resolvers

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/home/index2", ...

  9. org.thymeleaf.exceptions.TemplateInputException: Error resolving template 报错

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template报错 遇到二次,第一次是刚刚学的时候,都是一个原因,而 ...

随机推荐

  1. Xss过滤,只json型数据过滤,图片文件不过滤,采用jsoup

    package com.huaji.fes.filter; import javax.servlet.http.HttpServletRequest;import javax.servlet.http ...

  2. ViewPager+Fragment 懒加载

    转载于: 作者:尹star链接:http://www.jianshu.com/p/c5d29a0c3f4c來源:简书   ViewPager+Fragment的模式再常见不过了,以国民应用微信为例,假 ...

  3. Django安装与开发虚拟环境搭建01

    Django是一款基于python的MVT的web开发框架(m表示model,主要用于对数据库层的封装  ,v表示view,用于向用户展示结果,c表示controller,是核心,用于处理请求.获取数 ...

  4. 《从Paxos到Zookeeper:分布式一致性原理与实践》【PDF】下载

    内容简介 Paxos到Zookeeper分布式一致性原理与实践从分布式一致性的理论出发,向读者简要介绍几种典型的分布式一致性协议,以及解决分布式一致性问题的思路,其中重点讲解了Paxos和ZAB协议. ...

  5. EntityFramework Core数据查询

    前言 本节我们再来讲讲EF Core,本节算是回归基础吧,当前项目EF Core还是处于1.1版本中,后续等待.net core等版本稳定了全部会更新到2.0版本中,到时再来更新相关文章分享给大家. ...

  6. 【二十五】cookie与session学习总结

    一:cookie 1.创建cookie 关键字:setcookie 用于保存cookie 原理:当浏览器访问cookie.php页面时,我们的服务器就会以set-cookie的方式将cookie信息回 ...

  7. bzoj 4872: [Shoi2017]分手是祝愿

    Description Zeit und Raum trennen dich und mich. 时空将你我分开.B 君在玩一个游戏,这个游戏由 n 个灯和 n 个开关组成,给定这 n 个灯的初始状态 ...

  8. SpringMVC处理multipart请求.

    一.简述 multipart格式的数据会将一个表单拆分为多个部分(part),每个部分对应一个输入域.在一般的表单输入域中,它所对应的部分中会放置文本型数据,但是如果上传文件的话,它所对应的部分可以是 ...

  9. thinkphp 3.1.3 redis 只能读取 无法写入的问题

    找到thinkphp的目录 thinkphp\Extend\Driver\Cache    下面的Redis    大概在81行足有 // if(is_int($expire)) { // redis ...

  10. [总结]-2018 w1

    不想总结 2017,过去的就过去吧,不过自己在 2017 年还是收获了很多,最重要的就是赚钱.赚钱还是需要两把刷子,所以,2018 的小目标就是学习数据分析和机器学习.希望自己在这两个领域能搞点事情. ...