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

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

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

1、application.yml的配置问题

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

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。

上一篇:读书笔记>>Daniel H. Pink - The Adventures of Johnny Bunko_ The Last Career Guide You'll Ever


下一篇:什么是Data Consistency?