SpringBoot整合freemarker找不到静态资源ftl文件解决办法

1.检查是否引入freemarker依赖

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>

2.检查是否引入模板引擎依赖

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

3.检查是否引入html扫描器和标签补偿器依赖

<dependency>
   <groupId>net.sourceforge.nekohtml</groupId>
   <artifactId>nekohtml</artifactId>
   <version>1.9.22</version>
</dependency>

4.检查是否引入了自动重启以及自动清缓存(对访问静态资源至关重要)

<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-devtools</artifactId>
   <optional>true</optional>
</dependency>

 

©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页