Thymeleaf部署到tomcat报错本地没问题

发布于 2021-11-30 04:44:55 字数 4259 浏览 690 评论 7

本地springboot内置tomcat没问题,部署到tomcatJ就找不到页面!

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "login", 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:1257)
	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.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
	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:87)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:119)
	org.springframework.boot.web.support.ErrorPageFilter.access$000(ErrorPageFilter.java:61)
	org.springframework.boot.web.support.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:94)
	org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	org.springframework.boot.web.support.ErrorPageFilter.doFilter(ErrorPageFilter.java:112)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

能否归途做我良人 2021-12-05 06:37:40

不好意思解决了! 回复晚了抱歉, spring.thymeleaf.suffix=.html 后边莫名其妙有个空格。。。。删了就好了

筱武穆 2021-12-05 06:35:21

解决了吗?同问

勿忘初心 2021-12-05 06:28:36

解决了吗?

奢望 2021-12-05 06:26:27

解决了吗?什么问题导致的?

傾城如夢未必闌珊 2021-12-05 05:56:02

build里resource那些玩意去掉

离去的眼神 2021-12-05 05:05:57

遇到了。。没解决。。boom

累赘 2021-12-03 03:55:17

有没有遇到过的伙伴啊!!!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文