template模板找不到
springboot启动时报WARN的警告,
报错内容:Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
启动之后,执行访问报错。
上网找了解决方案
<resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> <!--加载模板文件--> <include>**/*.html</include> <!--加载静态文件--> <include>/static/</include> </includes> <filtering>false</filtering> </resource>
还没想原理,不过看解决方案应该是被过滤了,按说springboot不是不会过滤自己的templates下的静态文件么?后找时间再了解下