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 ...
随机推荐
- CSS父元素高度随子元素高度变化而变化
<html> <body> <head> <style> #menu{width:1000px;overfloat:hidden;} /* width: ...
- JavaScript DOM API初步(整理)
文档对象模型 文档对象模型(Doucment Object Model,DOM)是表示文档(如HTML文档.XML文档)和访问.操作构成文档的各种元素的应用程序接口.在DOM中,HTML文档的层次结构 ...
- Eclipse 不能build, pom文件上面有叉叉 解决办法
Error message: [html] view plaincopy execution not covered by lifecycle configuration: org.apache. ...
- 顺时针旋转打印n阶矩阵(内测第0届第4题)
题目要求 问题描述:顺时针旋转打印n阶矩阵 样例输入:4 1 2 3 4 12 13 14 5 11 16 15 6 10 9 8 7 样例输出:1 2 ...
- Google MapReduce到底解决什么问题?
很多时候,定义清楚问题比解决问题更难. 什么是MapReduce? 它不是一个产品,而是一种解决问题的思路,它有多个工程实现,Google在论文中也给出了它自己的工程架构实现. MapReduce这个 ...
- Linux系统/boot目录破损无法启动怎么办
linux系统中的/boot目录存放着系统开机所需要的各种文件,其中包含内核.开机菜单及所需配置文件等等.但是当不小心删除了/boot目录里的某些文件或者干脆整个/boot目录都不见了的情况下,该如何 ...
- 解决最小化安装Centos7后无法上网的问题,以及安装成功后的基本配置
发现问题 刚装完最小化的系统后,如果直接ping外网,可能回出现如下情况 解决问题 首先编辑虚拟机的DHCP池: 在弹出的“虚拟网络编辑器”窗口中选择NAT模式的,编辑为其分配地址池: 然后编辑网卡的 ...
- 光照渲染[Unity]
http://www.unitymanual.com/m/Manual/RenderingPaths.html http://wenku.baidu.com/view/54eca9e09b896802 ...
- Swiper.js的腾讯新闻演示
演示效果地址:https://www.swiper.com.cn/demo/indexsample/: 代码: <!DOCTYPE html> <html> <head& ...
- mysql load本地文件失败,提示access denied
mysql load本地文件失败,提示access denied 解决方式 直接谷歌到stackoverflow,解决方式如下 mysql -u myuser -p --local-infile so ...