原因:

SpringBoot会自动从/src/main/resources/templates目录获取Thymeleaf模板引擎,若该目录缺失,就会报该警告。

 

方法1:

创建该目录

 

方法2:

在application.yml中加入以下配置:

  thymeleaf:
    check-template: false
    check-template-location: false

如果是application.properties,就是加入

spring.thymeleaf.check-template=false
spring.thymeleaf.check-template-location=false

 

方法3:

去掉pom.xml中的以下配置:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

 

相关文章:

  • 2022-12-23
  • 2021-08-13
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
猜你喜欢
  • 2021-06-05
  • 2022-12-23
  • 2022-02-16
  • 2021-06-17
  • 2022-01-02
  • 2022-02-17
  • 2022-12-23
相关资源
相似解决方案