SpringBoot+Thyemleaf报错Template might not exist or might not be accessible

第一次搭建SpringBoot+Thyemleaf项目,就遇见这个错误,所以记录一下

出现这个错误大致从以下几个方面排除

1、application.yml的配置问题

2、pom.xml导入,需导入以下依赖

<dependency>
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
    <groupId>org.thymeleaf</groupId>
    <artifactId>thymeleaf-spring5</artifactId>
    <version>3.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>net.sourceforge.nekohtml</groupId>
    <artifactId>nekohtml</artifactId>
    <version>1.9.22</version>
</dependency>

3、上述配置之后,执行maven clean -------maven install。

猜你喜欢

转载自www.cnblogs.com/ma-zhuo/p/11751802.html
今日推荐