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 [dispatcherServlet] in context with path []
- threw exception [Request processing failed; nested exception is org.thymeleaf.ex
- ceptions.TemplateInputException: Error resolving template "/emailInfoManager/ema
- ilInfoList", template might not exist or might not be accessible by any of the c
- onfigured Template Resolvers] with root cause
- org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/emai
- lInfoManager/emailInfoList", template might not exist or might not be accessible
- by any of the configured Template Resolvers
- at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:
- 246)
- at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104)
- at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
- at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
- at org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView
- .java:335)
工程结构如下:
controller示例如下:
- @RequestMapping(value = "/findEmailInfoDataCriteria", method = RequestMethod.GET)
- public String findEmailInfoDataCriteria(@RequestParam(value = "page", defaultValue = "0") Integer page,
- @RequestParam(value = "size", defaultValue = "10") Integer size,
- @ModelAttribute("emailInfoData") EmailInfo emailInfo, ModelMap modelMap) {
- Page<EmailInfo> list = emailService.findEmailDataCriteria(page, size, emailInfo);
- modelMap.addAttribute("datas", list);
- return "/emailInfoManager/emailInfoList";
- }
经过大量的排查,最终的问题出在return "/emailInfoManager/emailInfoList";这行代码,去掉最前面的"/"就好了!
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/ template might not exist or might not be accessible by any of the configured的更多相关文章
- 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", ...
- org.thymeleaf.exceptions.TemplateInputException: Error resolving template 报错
org.thymeleaf.exceptions.TemplateInputException: Error resolving template报错 遇到二次,第一次是刚刚学的时候,都是一个原因,而 ...
- springboot报 org.thymeleaf.exceptions.TemplateInputException: Error resolving template "succeed";
--------------------- 本文转自 林晓风 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/Lin_xiaofeng/article/details/ ...
- Error resolving template,template might not exist or might not be accessible by any of the configured Template Resolvers
template might not exist or might not be accessible by any of the configured Template Resolvers at o ...
- spring boot 使用thymeleaf模版 报错:org.thymeleaf.exceptions.TemplateInputException
错误: org.thymeleaf.exceptions.TemplateInputException: Error resolving template "Hello", tem ...
- spring boot + thymeleaf 报错 org.thymeleaf.exceptions.TemplateInputException
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "admin/verifyPassword ...
- template might not exist or might not be accessible by any of the configured Template Resolvers at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [code/leading], template m ...
- template might not exist or might not be accessible by any of the configured Template Resolvers
距离上一篇文章已经很长时间了,最近太忙碌了,今天发布spring boot遇到一个问题,找了好久才找到解决办法,今天贴出来和大家一起分享下,首先看错误信息 HTTP Status 500 - Requ ...
- Spring Boot使用thymeleaf模板时报异常:template might not exist or might not be accessible by any of the configured Template Resolvers
错误如下: template might not exist or might not be accessible by any of the configured Template Resolver ...
随机推荐
- [golang] Glide 包管理
一.概述 golang的包管理工具有很多,本篇幅主要介绍glide进行包管理. 二.安装及命令介绍 go get github.com/Masterminds/glide glide create|i ...
- robotframework + appium 获取android toast
android toast 获取主要方式是在出现toast的时候查找元素:xpath=//*[contains(@text,'记同步')] ,该xpath 表示为toast信息含有 "记 ...
- 对 /sbin/nologin 的理解
对 /sbin/nologin 的理解 系统账号的shell使用 /sbin/nologin ,此时无法登陆系统,即使给了密码也不行. 所谓“无法登陆”指的仅是这个用户无法使用bash或其他she ...
- iOS提交iTunes审核时出现Invalid Binary错误
xcode5编译一个xcode4时写的代码,提交iTunes审核时出错. 1.iOS提交审核时出现Invalid Binary错误 2.收到邮件: iPhone 5 Optimization Requ ...
- PxCook(像素大厨)
PxCook(像素大厨)是一款切图设计工具软件.自2.0.0版本开始,支持PSD文件的文字,颜色,距离自动智能识别. 优点在于将标注.切图这两项设计完稿后集成在一个软件内完成,支持Windows和Ma ...
- 行为类模式(十):模板方法(Template Method)
定义 定义一个操作中的算法的骨架,而将步骤延迟到子类中.模板方法使得子类可以不改变一个算法的结构即可重定义算法的某些特定步骤. UML 优点 模板方法模式通过把不变的行为搬移到超类,去除了子类中的重复 ...
- java: 保留两位小数4种方法
import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.NumberFormat; public c ...
- 每日英语:How Often Do Gamblers Really Win?
The casino billboards lining America's roadways tantalize with the lure of riches. 'Easy Street. It' ...
- 【C/C++】struct探索·extern "C"含义探索 ·C++与C的混合编程·C 语言高效编程的几招
本文为笔者阅读<嵌入式C精华>的摘录,推荐一下,不错的书 一.C/C++语言 struct深层探索 1.自然对界 struct是一种复合数据类型,其构成元素既可以是基本数据类型(如 int ...
- BI--SAP BI的权限管理
源地址 :http://silverw0396.iteye.com/blog/229274 一.sapBI的用户分类 There are different types of users in SAP ...