解决WARN:Cannot find template location: classpath:/templates/


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

问题解决

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM