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

  1. 严重: Servlet.service() for servlet [dispatcherServlet] in context with path []
  2. threw exception [Request processing failed; nested exception is org.thymeleaf.ex
  3. ceptions.TemplateInputException: Error resolving template "/emailInfoManager/ema
  4. ilInfoList", template might not exist or might not be accessible by any of the c
  5. onfigured Template Resolvers] with root cause
  6. org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/emai
  7. lInfoManager/emailInfoList", template might not exist or might not be accessible
  8. by any of the configured Template Resolvers
  9. at org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:
  10. 246)
  11. at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104)
  12. at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
  13. at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
  14. at org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView
  15. .java:335)

工程结构如下:

controller示例如下:

  1. @RequestMapping(value = "/findEmailInfoDataCriteria", method = RequestMethod.GET)
  2. public String findEmailInfoDataCriteria(@RequestParam(value = "page", defaultValue = "0") Integer page,
  3. @RequestParam(value = "size", defaultValue = "10") Integer size,
  4. @ModelAttribute("emailInfoData") EmailInfo emailInfo, ModelMap modelMap) {
  5. Page<EmailInfo> list = emailService.findEmailDataCriteria(page, size, emailInfo);
  6. modelMap.addAttribute("datas", list);
  7. return "/emailInfoManager/emailInfoList";
  8. }

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

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/ template might not exist or might not be accessible by any of the configured的更多相关文章

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

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template "/home/index2", ...

  2. org.thymeleaf.exceptions.TemplateInputException: Error resolving template 报错

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template报错 遇到二次,第一次是刚刚学的时候,都是一个原因,而 ...

  3. springboot报 org.thymeleaf.exceptions.TemplateInputException: Error resolving template "succeed";

    --------------------- 本文转自 林晓风 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/Lin_xiaofeng/article/details/ ...

  4. Error resolving template,template might not exist or might not be accessible by any of the configured Template Resolvers

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

  5. spring boot 使用thymeleaf模版 报错:org.thymeleaf.exceptions.TemplateInputException

    错误: org.thymeleaf.exceptions.TemplateInputException: Error resolving template "Hello", tem ...

  6. spring boot + thymeleaf 报错 org.thymeleaf.exceptions.TemplateInputException

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template "admin/verifyPassword ...

  7. template might not exist or might not be accessible by any of the configured Template Resolvers at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)

    org.thymeleaf.exceptions.TemplateInputException: Error resolving template [code/leading], template m ...

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

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

  9. Spring Boot使用thymeleaf模板时报异常:template might not exist or might not be accessible by any of the configured Template Resolvers

    错误如下: template might not exist or might not be accessible by any of the configured Template Resolver ...

随机推荐

  1. php分享十三:mysql事物

    一:事物的隔离级别 1:隔离级别的类型 SQL标准定义了4类隔离级别,包括了一些具体规则,用来限定事务内外的哪些改变是可见的,哪些是不可见的: Read Uncommitted(读取未提交内容) Re ...

  2. 【Android开发】之Android环境搭建及HelloWorld

    原文链接:http://android.eoe.cn/topic/android_sdk Android开发之旅:环境搭建及HelloWorld Android开发之旅:环境搭建及HelloWorld ...

  3. linux分区详解

    点评:如果你想了解linux分区,请务必认真阅读本文.对于初学者来说,linux分区不像windows下那么一目了解.    Linux 分区的规定      1. 设备管理 在 Linux 中,每一 ...

  4. ios获取文件的MD5值

    一般我们在使用http或者socket上传或者下载文件的时候,经常会在完成之后经行一次MD5值得校验(尤其是在断点续传的时候用的更 多),校验MD5值是为了防止在传输的过程当中丢包或者数据包被篡改,在 ...

  5. sql server2000导出表结构说明

    SELECT 表名 then d.name else '' end, 表说明 then isnull(f.value,'') else '' end, 字段序号=a.colorder, 字段名=a.n ...

  6. [Windows Azure] How to Create and Configure SQL Database

    How to Create and Configure SQL Database In this topic, you'll step through logical server creation ...

  7. android工程导入没有错误,运行提示Unable to instantiate activity ComponentInfo

    导入小米clientside_android_sdk的demo OAuth-OpenAuthDemo,点Java Build Path的Libraries内Add External JARs,将oau ...

  8. Asp.Net计算程序执行速度

    long t1 = DateTime.Now.Ticks; //执行程序,例如处理100个文件 long t2 = DateTime.Now.Ticks; Response.Write("执 ...

  9. JMeter测试工具中的参数化使用[函数助手]

    下面是我使用JMeter测试工具对某项目中的一个http接口进行测试时的配置参数,使用到了JMeter的随机函数: 在发送POST请求时,需要发送json格式的数据,其中使用到JMeter的" ...

  10. CSS实现:标题两侧画线效果

    如图: html代码: <div class="detail-news"> <h5 class="detail-news-title"> ...