1、在templates目录下新建index.ftl文件,如下图:

Spring Boot + freemarker

2、增加组件:

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

3、在resources目录下新建application.yml,freemarker默认是以.ftl结尾的,可通过配置文件的方式将其改为以html结尾的文件,如下图:

Spring Boot + freemarker

相关文章:

  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2021-10-20
  • 2021-12-13
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-04
  • 2021-06-02
  • 2021-05-15
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案