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。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM