SpringBoot启动日志打印警告:Cannot find template location: classpath:/templates/ (please add some templates or check your Thymel


 1 <!--下面代码的配置会导致这个警告-->
 2 <!--Cannot find template location: classpath:/templates/ (please add some templates or check your Thymel-->
 3             <!--<resource>-->
 4                 <!--<directory>src/main/resources</directory>-->
 5                 <!--<includes>-->
 6                     <!--<include>**/*.yml</include>-->
 7                     <!--<include>**/*.xml</include>-->
 8                     <!--<include>**/*.properties</include>-->
 9                 <!--</includes>-->
10                 <!--<filtering>false</filtering>-->
11             <!--</resource>-->

那么我们有时候吧配置文件放在这里,也会被过滤掉,怎么办呢?

如果要配置上述释放资源,只需要加上<include>**/*.html</include>,将所有的html资源也释放,否则templates中的html文件会被过滤掉.


免责声明!

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



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