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 ...
随机推荐
- mysql出现Too many connections的解决...
最近写javaee项目的时候,mysql报了too many connections的错误,百度的内容有一些有问题,所以我重新写一下我的解决方法. mysql -u root -p 回车输入密码进入m ...
- mysql 中只能使用 localhost 登录,用ip不能登陆
解决办法 1 首先使用 localhost 登录 mysql 服务器,如果想要所用ip都可以登录本地mysql 服务器,执行以下授权命令 2 grant all privileges on *.* t ...
- python3 元类编程的一个例子
[引子] 虽然我们可以通过“class”语句来定义“类”,但是要想更加细粒度的控制“类”的创建,要使用元类编程才能实现. 比如说我们要实现这样的一个约束.所有项目中用到的类都应该要为它定义的方法提供文 ...
- PHP取整,四舍五入取整、向上取整、向下取整、小数截取
PHP取整数函数常用的四种方法: 1.直接取整,舍弃小数,保留整数:intval(): 2.四舍五入取整:round(): 3.向上取整,有小数就加1:ceil(): 4.向下取整:floor(). ...
- nginx静态资源缓存与压缩
一.静态资源缓存 参考文章 (1)apache设置max-age或expires 这里需要修改.htaccess文件. <IfModule mod_headers.c> <Files ...
- Android百日程序 开篇章:Intent打开网页
学习一下人家100日写100个网页的做法,我也用100日写100个完整的Android程序. 这些程序的最基本要求: 1 完整性-每一个程序都必须是独立可执行的 2 不反复性-所用的重点知识点都不一样 ...
- Android数据库高手秘籍(零)——前言
转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/38083103 在我刚開始接触Android的时候甚至都不敢相信.Android系统 ...
- Theories of Deep Learning
https://stats385.github.io/readings Lecture 1 – Deep Learning Challenge. Is There Theory? Readings D ...
- App开放接口API安全性 — Token签名sign的设计与实现
在app开放接口API的设计中,避免不了的就是安全性问题. 一.https协议 对于一些敏感的API接口,需要使用https协议. https是在http超文本传输协议加入SSL层,它在网络间通信是加 ...
- javascript原生bind方法详解
bind()方法,是javascript原生的函数类的一个原型方法(即Function.prototype里的方法),不支持ie低版本. 基本格式: function.bind(obj1,obj2,o ...