freemaker的使用入门教程
2018-10-12 本文已影响0人
蛋皮皮652
1.首先需要在pom.xml中加入freemaker的依赖
<!-- 引入freemaker依赖 -->
<groupId>org.springframework.boot
<artifactId>spring-boot-starter-freemarker
</dependency>

2.创建ftl文件,先创建html文件改后缀名

3.在resources下创建html文件夹,用于存放生成的html文件。
4.接着看controller

5.创建IndexStstic

6.创建生成静态页面的方法

7.写接口

8.ftl文件


效果图如下
