Springboot + Freemarker(一)
2020-12-13 02:33
标签:model RKE mod framework sed string closed return dem Controller 编写 ftl 页面 输出结果: Springboot + Freemarker(一) 标签:model RKE mod framework sed string closed return dem 原文地址:https://www.cnblogs.com/cangcat/p/Freemarker_1.html 1
Freemarker 页面目录配置
1 spring:
2 mvc:
3 view:
4 prefix: /templates/
5 suffix: .ftl
1 @Controller
2 @RequestMapping("test")
3 public class DemoController {
4
5
6 @RequestMapping("toDemo")
7 public String toDemo(ModelMap modelMap){
8 List arr = new ArrayList();
9 arr.add("狗贼");
10 arr.add("企鹅");
11
12 modelMap.put("arr",arr);
13
14 return "demo";
15 }
16
17 }
1
2
3
5
6 姓名
4
7
9 #list>
10 ${i}
8