1.向pom.xml文件中加入依赖

Springboot导入freemarker模板

2.application.poperties中添加后缀

Springboot导入freemarker模板

3.在controller中添加model

Springboot导入freemarker模板

 

 4.在html文件中显示freemaker,模板默认是放在temlates文件夹下

Springboot导入freemarker模板

Tips:如果html页面无法识别freemaker的标签,比如<#list>..

在idea settings中找到freemarker添加.*html,这样标签就不会报错了

Springboot导入freemarker模板

 

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2021-10-08
  • 2022-12-23
  • 2022-12-23
  • 2021-05-25
  • 2022-01-12
  • 2022-02-10
猜你喜欢
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案