启动Spring Boot出现警告
WARN 6428 --- [ restartedMain] ion$DefaultTemplateResolverConfiguration : Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
原因分析:
templates 文件夹下没有html,jsp或者ftl文件
application.properties配置文件为:
spring.thymeleaf.check-template=true
spring.thymeleaf.check-template-location=true
它会去扫描你的templates文件夹下是否有html,jsp或者ftl文件,如果没有就会报出警告
此警告可以不处理,对程序运行无影响
处理方法:将true改为false
spring.thymeleaf.check-template=false
spring.thymeleaf.check-template-location=false