```console
2019-11-11 21:02:03.457 [https-jsse-nio-10008-exec-6] ERROR o.a.c.c.C.[.[.[/].[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/page/join/applyInfo.html]")] with root cause
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/tempL/_applyInfoUser], template might not exist or might not be accessible by any of the configured Template Resolvers (template: "page/join/applyInfo" - line 17, col 22)
at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)
```
<br>
以上报错信息是thymeleaf引用模板引擎因为找不到模板文件而报错<br>
这是我的引用语句:<br>
<br>
<br>
`th:include=""`属性用于thymeleaf引用模板后渲染<br>
文件路径:`classpath:/templates/page/join/appliInfo.html`<br>
<br>
然后是我的定义模板的文件:<br>
<br>
`th:fragment=""用于定义该部分的模板可以被引用`<br>
文件路径:`classpath:/templates/page/tempL/_applyInfoUser.html`<br>
<br>
## 出问题的原因
从报出的异常上来看其实很简单,就是引用的模板找不到(不存在)<br>
也就是我们引用的路径填写的不对<br>
在windows环境下不论你引用路径前是否有`/`,thymeleaf都会在`classpath:/templates/`下查找你的文件<br>
*ps:我的`thymeleaf`配置:*<br>
<br>
然后将你的程序(项目)部署到Linux环境上时,如果你引用的模板文件前加上了`/`的话,thymeleaf会在系统路径下查找你的文件,这也就导致为什么部署到linux环境时引用模板会报错<br>
## 解决
去掉`/`<br>

thymeleaf在windows环境下引用模板正常,到linux环境报错的问题