美文网首页
freemaker的使用入门教程

freemaker的使用入门教程

作者: 蛋皮皮652 | 来源:发表于2018-10-12 17:18 被阅读0次

1.首先需要在pom.xml中加入freemaker的依赖

<!-- 引入freemaker依赖 -->

  <groupId>org.springframework.boot

  <artifactId>spring-boot-starter-freemarker

</dependency>

freemaker依赖

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

ftl文件

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

4.接着看controller

controller

5.创建IndexStstic

controller

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

controller

7.写接口

controller

8.ftl文件

freemaker.ftl hello.ftl

效果图如下

效果图

相关文章

网友评论

      本文标题:freemaker的使用入门教程

      本文链接:https://www.haomeiwen.com/subject/pmpgaftx.html