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