SpringBoot+Thyemleaf报错:Error resolving template Template might not exist or might not be accessible
昨晚下班之前代码好好的,今天一开机就报错这个,浪费了一个半小时的总结:
1、在pom.xml 添加以下依赖:
<dependency> <groupId>net.sourceforge.nekohtml</groupId> <artifactId>nekohtml</artifactId> <version>1.9.22</version> </dependency>
NekoHTML是一个Java语言的HTML扫描器和标签补全器,主要用于解析HTML文档并用标准的XML接口访问其中的信息。它能自动修正HTML中的常见错误,例如补全缺失的父元素、关闭不匹配的标签等.
2、pom.xml中的添加如下:
<resources> <resource> <directory>src/main/resources</directory> 如果此处有 include请全部删除 <filtering>true</filtering> </resource> </resources>
坑爹啊。。。。。
浙公网安备 33010602011771号