Error resolving template [xxx], template might not exist or might not be exist
Posted freestudy
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Error resolving template [xxx], template might not exist or might not be exist相关的知识,希望对你有一定的参考价值。
Springboot+thymeleaf+mybatis 抛Error resolving template [xxx], template might not exist的异常
原因是我们在pom.xml增加的以下内容导致的,以下内容中src/main/resources这项中没有把你的html文件包括进去,懒一点的做法(<include>**/*.*</include>),
<resources>
<resource>
<targetPath>${project.build.directory}/classes</targetPath>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.yml</include>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<targetPath>${project.build.directory}/classes</targetPath>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
还有增加整段内容的目的是为了解决另一个问题,扫描不到mybatis的mapper.xml文件(在调用Mapper层方法时报错:Invalid bound statement (not found)),增加在最后面的<build></build>之间
以上是关于Error resolving template [xxx], template might not exist or might not be exist的主要内容,如果未能解决你的问题,请参考以下文章
Thymeleaf org.thymeleaf.exceptions.TemplateInputException: Error resolving template [xxx]
Error resolving template [xxx], template might not exist or might not be exist
报错Error resolving template template might not exist or might not be accessible解决方案
解决Error resolving template template might not exist or might not be accessible问题
异常:Error resolving template "xxx", template might not exist or might not be accessible...解
springboot报 org.thymeleaf.exceptions.TemplateInputException: Error resolving template "succeed&