template might not exist or might not be accessible by any of the configured Template Resolvers

简介: 距离上一篇文章已经很长时间了,最近太忙碌了,今天发布spring boot遇到一个问题,找了好久才找到解决办法,今天贴出来和大家一起分享下,首先看错误信息 1 HTTP Status 500 - Request processing failed; nested exception is org.

距离上一篇文章已经很长时间了,最近太忙碌了,今天发布spring boot遇到一个问题,找了好久才找到解决办法,今天贴出来和大家一起分享下,首先看错误信息

 1 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
 2 
 3 
 4 type Exception report
 5 
 6 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
 7 
 8 description The server encountered an internal error that prevented it from fulfilling this request.
 9 
10 exception
11 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
12     org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982)
13     org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
14     javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
15     org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
16     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
17     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
18     org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
19     org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
20     org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
21     org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
22     org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
23     org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
24     org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167)
25     org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
26     org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
27     org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
28 
29 
30 root cause
31 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
32     org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:246)
33     org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104)
34     org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
35     org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
36     org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
37     org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
38     org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1282)
39     org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
40     org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
41     org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
42     org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
43     org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
44     javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
45     org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
46     javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
47     org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
48     org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
49     org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
50     org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
51     org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
52     org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
53     org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
54     org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:167)
55     org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:80)
56     org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
57     org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
58 
59 
60 note The full stack trace of the root cause is available in the Apache Tomcat/8.5.11 logs.
61 
62 
63 Apache Tomcat/8.5.11

spring boot + thymeleaf 是第一次使用并发布,本地代码没有问题,发布到服务器就出现了上面的错误,看到网上很多人说是配置的问题,尝试了很多种都不行,最后终于发现是有一个很简单的问题造成的,直接看解决办法:

没解决前的controller:

解决口的controller:

然后发布就解决上面的问题了。

开开心心编码,快快乐乐生活。
目录
相关文章
|
4月前
|
JavaScript
Property “selectedItemIndex“ was accessed during render but is not defined on instance. 报错解决
Property “selectedItemIndex“ was accessed during render but is not defined on instance. 报错解决
119 0
|
12天前
|
JavaScript
【报错】onMounted is called when there is no active component instance too be associated with.
【报错】onMounted is called when there is no active component instance too be associated with.
|
4月前
Error: Plugin/Preset files are not allowed to export objects, only functions……
Error: Plugin/Preset files are not allowed to export objects, only functions……
|
JavaScript API
properties starting with “$“,“_“ are not proxied in the Vue instance to prevent conflicts
properties starting with “$“,“_“ are not proxied in the Vue instance to prevent conflicts
79 0
properties starting with “$“,“_“ are not proxied in the Vue instance to prevent conflicts
|
JavaScript 算法 前端开发
Property xxx was accessed during render but is not defined on instance
目前el-form的model主要用表单验证的,也就是配合el-form的rules和el-form-item的prop来使用的。不信的话,你可以增加一个rules和prop(为了调用验证方法,也el-form也加一个ref属性,相当于id或者class选择器的意思),但是不写model,然后验证的话,会提示缺少model,导致无法验证成功。
Property xxx was accessed during render but is not defined on instance
|
Java
The type XXX cannot be resolved. It is indirectly referenced from required .class files
The type XXX cannot be resolved. It is indirectly referenced from required .class files
84 0
jinja2: Can't perform this operation for unregistered loader type
jinja2: Can't perform this operation for unregistered loader type
No injector for custom defined data type的解决办法
No injector for custom defined data type的解决办法
224 0
No injector for custom defined data type的解决办法

热门文章

最新文章