template might not exist or might not be accessible by any of the configured Template Resolvers
距离上一篇文章已经很长时间了,最近太忙碌了,今天发布spring boot遇到一个问题,找了好久才找到解决办法,今天贴出来和大家一起分享下,首先看错误信息
HTTP Status 500 - Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/error/error", template might not exist or might not be accessible by any of the configured Template Resolvers type Exception report message Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/error/error", template might not exist or might not be accessible by any of the configured Template Resolvers description The server encountered an internal error that prevented it from fulfilling this request. exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/error/error", template might not exist or might not be accessible by any of the configured Template Resolvers
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167)
org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) root cause
org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/error/error", template might not exist or might not be accessible by any of the configured Template Resolvers
org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:246)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1282)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167)
org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) note The full stack trace of the root cause is available in the Apache Tomcat/8.5.11 logs. Apache Tomcat/8.5.11
spring boot + thymeleaf 是第一次使用并发布,本地代码没有问题,发布到服务器就出现了上面的错误,看到网上很多人说是配置的问题,尝试了很多种都不行,最后终于发现是有一个很简单的问题造成的,直接看解决办法:
没解决前的controller:

解决口的controller:

然后发布就解决上面的问题了。
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", 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", ...
 - 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 ...
 - 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 完美解决
		
初学者在maven spring boot web项目中使用thymeleaf 模板,经常会遇到 “template might not exist or might not be accessib ...
 - 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 ...
 - SpringBoot使用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 Resolvers ...
 - Error resolving template “pages”, template might not exist or might not be accessible by any of the configured Template Resolver  或者  springboot使用thymeleaf时报html没有结束标签
		
application.properties配置文件 spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix=.ht ...
 - 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 ...
 - 【SpringBoot+Mybatis+thymeleaf报错】Error resolving template "XXX", template might not exist or might not be accessible by any of the configured
		
解决方法一: 原因:在使用springboot的过程中,如果使用thymeleaf作为模板文件,则要求HTML格式必须为严格的html5格式,必须有结束标签,否则会报错. 在application.y ...
 
随机推荐
- ionic之$ionicHistory
			
$ionicHistory 定义:当用户通过导航栏切换视图页面的时候,ionicHistory起到跟踪视图的作用,类似的浏览器的行为方式,一个ionic应用程序能够保持以前的视图,当前视图,和前视图( ...
 - elasticsearch系列(三)分表分库
			
首先ES没有库和表的概念,只有index,type,document(详细术语可以看ES的系列一 http://www.cnblogs.com/ulysses-you/p/6736926.html), ...
 - C# 时间格式总结
			
C#时间/日期格式大全 C#时间/日期格式大全,C#时间/日期函数大全 有时候我们要对时间进行转换,达到不同的显示效果 默认格式为:2005-6-6 14:33:34 如果要换成成200506,06- ...
 - Natas Wargame Level 3 Writeup 与 robots.txt
			
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnsAAAC5CAYAAABQi/kBAAAABHNCSVQICAgIfAhkiAAAIABJREFUeF
 - Day4-内置函数--未完待续,慢慢写
			
内置函数:https://docs.python.org/3/library/functions.html?highlight=built#ascii 未完待续....
 - Hibernate composite key
			
有两种方法来map composite key. 第一种用@IdClass第二种用@Embeddable,参考链接: http://stackoverflow.com/questions/358503 ...
 - Python正则表达式完全指南(上)
			
正则表达式处理文本有如疾风扫秋叶,绝大部分编程语言都内置支持正则表达式,它应用在诸如表单验证.文本提取.替换等场景.爬虫系统更是离不开正则表达式,用好正则表达式往往能收到事半功倍的效果. 介绍正则表达 ...
 - 教育行业app开发新契机,在线教育要从B端出发
			
近几年移动互联网教育风生水起,在运营模式上的开拓也各不相同,随着移动互联网进入下半场,好未来.新东方.猿题库.学霸君等,都在加速三四线地区布局,以及教育行业app开发和升级. 在移动互联网下半场,用户 ...
 - Maven学习(五)
			
使用Maven构建多模块项目 一般的web项目构成: 建立解决方案目录parent 首先使用命令进入到我们需要建立maven项目的目录: mvn archetype:generate -DgroupI ...
 - sparklyr包:实现Spark与R的接口
			
日前,Rstudio公司发布了sparklyr包.该包具有以下几个功能: 实现R与Spark的连接—sparklyr包提供了一个完整的dplyr后端 筛选并聚合Spark数据集,接着在R中实现分析与可 ...