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 ...
随机推荐
- jenkins启动appium服务
想在jenkins中,自动定时启动appium服务,shell命令已准备如下: BUILD_ID=dontKillMe echo "" > appium.log nohup ...
- django-TDD
1.什么是TDD: 测试驱动开发(Test-Driven Development) 它的总体思想是在写“实现”之前先写针对实现的“测试”,由于编写测试的时候 你要思考很多的可能性能,更多的思考也就意味 ...
- Hadoop hostname: Unknown host
本来下想在一台虚拟机上,搭建一个hadoop的测试hadoop,用于调试和阅读hadoop源代码,发现在虚拟机上执行: $hostname -i hostname: Unknown host 这个是因 ...
- 修复 dji spark 的 micro sd/tf 存储卡里不能正常播放的视频文件
可能是因为 1.在没有正确的操作停止录像前,关掉了 spark 的电源 2.在 spark 没有完成视频存储前,关掉了 spark 的电源 总之在电脑里想查看存储卡里的视频时,发现居然无法播放,这就太 ...
- apache做转发
一台WIN服务器,上面主要装了WAMP程序来运行PHP 的相关东西,现在在机子里的IIS建立了一个ASP.NET站点,访问端口88,服务器上可以:http://127.0.0.1:88来访问.NET网 ...
- 关于iPhone音频的那些事
音频文件(Audio File) 1.有两个概念(1).文件格式(File Format or Audio Containers)——描述文件本身的格式,里面的音频数据可以用不同的编码格式.例如:ca ...
- Vue2 原理解析
现代主流框架均使用一种数据=>视图的方式,隐藏了繁琐的dom操作,采用了声明式编程(Declarative Programming)替代了过去的类jquery的命令式编程(Imperative ...
- nginx check_http_send type=http 查检测不到后端TOM的存活
原因:定位到../conf/server.xml中 <Connector port="8020" protocol="org.apache.coyote.http1 ...
- dom4j: 生成XML时文本中回车换行无效
属性文本中回车换行在输出时被dom4j自动去掉了. 解决办法: 将format.setTrimText(false); 即可.因为 createPrettyPrint()方法中有 format.set ...
- chrome浏览器:chrome 69 恢复默认UI
1.在浏览器地址栏输入 chrome://flags/#top-chrome-md 并回车 2.将UI Layout for the browser's top chrome 右边的选项修改为Norm ...