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文件会被过滤掉.