In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Springboot visits the page when deployed to the test environment always report errors how to solve, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
When visiting the page, thymeleaf template engine is used. When accessing the resource page, the scope is normal on the windows system's own computer, but the error is always reported when deployed to the test environment:
2019-07-19 11 localhost 50 dispatcherServlet 36.401 [http-nio-8099-exec-4] ERROR o.a.c.c.C. [localhost]. [/]. [dispatcherServlet]-Servlet.service () for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template "batchconfig/batchErrorconfig", template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause
Org.thymeleaf.exceptions.TemplateInputException: Error resolving template "batchconfig/batchErrorconfig", template might not exist or might not be accessible by any of the configured Template Resolvers
At org.thymeleaf.engine.TemplateManager.resolveTemplate (TemplateManager.java:870)
At org.thymeleaf.engine.TemplateManager.parseAndProcess (TemplateManager.java:607)
At org.thymeleaf.TemplateEngine.process (TemplateEngine.java:1098)
At org.thymeleaf.TemplateEngine.process (TemplateEngine.java:1072)
At org.thymeleaf.spring5.view.ThymeleafView.renderFragment (ThymeleafView.java:354)
At org.thymeleaf.spring5.view.ThymeleafView.render (ThymeleafView.java:187)
At org.springframework.web.servlet.DispatcherServlet.render (DispatcherServlet.java:1325)
At org.springframework.web.servlet.DispatcherServlet.processDispatchResult (DispatcherServlet.java:1069)
At org.springframework.web.servlet.DispatcherServlet.doDispatch (DispatcherServlet.java:1008)
At org.springframework.web.servlet.DispatcherServlet.doService (DispatcherServlet.java:925)
At org.springframework.web.servlet.FrameworkServlet.processRequest (FrameworkServlet.java:974)
At org.springframework.web.servlet.FrameworkServlet.doGet (FrameworkServlet.java:866)
At javax.servlet.http.HttpServlet.service (HttpServlet.java:635)
At org.springframework.web.servlet.FrameworkServlet.service (FrameworkServlet.java:851)
At javax.servlet.http.HttpServlet.service (HttpServlet.java:742)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:231)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.apache.tomcat.websocket.server.WsFilter.doFilter (WsFilter.java:52)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics (WebMvcMetricsFilter.java:158)
At org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics (WebMvcMetricsFilter.java:126)
At org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal (WebMvcMetricsFilter.java:111)
At org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.jasig.cas.client.util.AssertionThreadLocalFilter.doFilter (AssertionThreadLocalFilter.java:54)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.jasig.cas.client.util.HttpServletRequestWrapperFilter.doFilter (HttpServletRequestWrapperFilter.java:75)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At com.yooli.sso.cas.AbstractTicketValidationFilter.doFilter (AbstractTicketValidationFilter.java:202)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At com.yooli.sso.cas.AuthenticationFilter.doFilter (AuthenticationFilter.java:125)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At com.yooli.sso.cas.SingleSignOutFilter.doFilter (SingleSignOutFilter.java:92)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal (HttpTraceFilter.java:90)
At org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.springframework.web.filter.RequestContextFilter.doFilterInternal (RequestContextFilter.java:99)
At org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal (HttpPutFormContentFilter.java:109)
At org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal (HiddenHttpMethodFilter.java:93)
At org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal (SessionRepositoryFilter.java:147)
At org.springframework.session.web.http.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:81)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal (CharacterEncodingFilter.java:200)
At org.springframework.web.filter.OncePerRequestFilter.doFilter (OncePerRequestFilter.java:107)
At org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:193)
At org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:166)
At org.apache.catalina.core.StandardWrapperValve.invoke (StandardWrapperValve.java:198)
At org.apache.catalina.core.StandardContextValve.invoke (StandardContextValve.java:96)
At org.apache.catalina.authenticator.AuthenticatorBase.invoke (AuthenticatorBase.java:496)
At org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:140)
At org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:81)
At org.apache.catalina.core.StandardEngineValve.invoke (StandardEngineValve.java:87)
At org.apache.catalina.connector.CoyoteAdapter.service (CoyoteAdapter.java:342)
At org.apache.coyote.http11.Http11Processor.service (Http11Processor.java:803)
At org.apache.coyote.AbstractProcessorLight.process (AbstractProcessorLight.java:66)
At org.apache.coyote.AbstractProtocol$ConnectionHandler.process (AbstractProtocol.java:790)
At org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun (NioEndpoint.java:1468)
At org.apache.tomcat.util.net.SocketProcessorBase.run (SocketProcessorBase.java:49)
At java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
At java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
At org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run (TaskThread.java:61)
At java.lang.Thread.run (Thread.java:748)
But look at my configuration:
Spring.thymeleaf.prefix=classpath:/templates/spring.thymeleaf.suffix=.htmlspring.thymeleaf.mode=LEGACYHTML5spring.thymeleaf.encoding=UTF-8spring.thymeleaf.content-type=text/htmlspring.thymeleaf.cache=false
Look at my directory structure (you can see that the directory file exists):
Tried n many ways, still the same
Later, after comparison, it was found that the file name of the resource template must be in all lowercase):
After modification and re-deployment, you can find that the page can be accessed normally:
This problem is really disgusting. I tried a lot of configurations, and then I inadvertently thought of changing the name to all lowercase. It was also an accident to solve the problem. I don't know if it was the problem of springboot or the thymeleaf engine.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.