• org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/userProtocol", template might not exist or might not be accessible by any of the configured Template Resolvers


    异常现象:在本地访问打包部署完全没有问题,资源文件也都可以映射上,但是打包部署到服务器上时,就一直报异常,异常信息如下:

     org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/userProtocol", 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)
    at org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1286)
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    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)

     经过大量的排查,最终的问题出在return "/emailInfoManager/emailInfoList";这行代码,去掉最前面的"/"就好了!

  • 相关阅读:
    Java基础之在窗口中绘图——移动曲线的控制点(CurveApplet 3 moving the control points)
    【javascript】BOM介绍
    【javascript】Web Storage机制
    【javascript】50. Pow(x, n)
    【java】6. ZigZag Conversion
    【java】最长回文字符串(源码)
    【javascript】js实现单例模式
    【js注入】js注入
    【bootstrap】bootstrap可关闭警告框
    【h5】h5数据跨域交换postMessage用法
  • 原文地址:https://www.cnblogs.com/fmling/p/9101322.html
Copyright © 2020-2023  润新知