springboot配置了 thymeleaf 启动warning:Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf.
检查思路:
1. pom.xml中是否配置了,这个估计是和springboot版本有关,低版本如springboot1.5.3就要检查的多,高版本只需要将模板放到resources/templates/下就可以被扫描到。

2. 检查你的application.properties/yml中是否有如下配置。

本文针对SpringBoot项目中配置Thymeleaf后出现的警告问题进行解析,提供检查思路,包括pom.xml配置确认及application.properties/yml配置核查,帮助开发者快速定位并解决问题。
2762

被折叠的 条评论
为什么被折叠?



