SpringBoot 項目啟動后,在控制台有一個WARN
WARN 14516 --- [main] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
原因:
templates 文件夾下沒有html,jsp或者ftl文件
解決方案:
(1)在/src/main/resources/templates 目錄下添加
模板文件(后綴為html,.jsp 或 .ftl 的文件)
(2)在配置文件 application.properties 中添加
spring.thymeleaf.check-template-location=false
問題解決