• 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";这行代码,去掉最前面的"/"就好了!

  • 相关阅读:
    C++primer plus第六版课后编程题答案7.2
    sprintf函数
    sscanf函数
    [转]Visual Studio 2012 编译错误【error C4996: 'scanf': This function or variable may be unsafe. 】的解决方案
    C/C++动态二维数组的内存分配和释放
    malloc动态分配多维数组
    区间重合判断[poj2808 校门外的树]
    C++中的sort函数
    C语言qsort
    [转]Linux统计代码行数
  • 原文地址:https://www.cnblogs.com/fmling/p/9101322.html
Copyright © 2020-2023  润新知