1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| package com.example.demo.action;
|
| import org.springframework.stereotype.Service;
| import xyz.erupt.tpl.annotation.EruptTpl;
| import xyz.erupt.tpl.annotation.TplAction;
|
| import java.util.HashMap;
| import java.util.LinkedHashMap;
| import java.util.Map;
|
| /**
| * @author YuePeng
| * date 2020-02-24
| */
| @EruptTpl
| @Service
| public class FreemarkerAction {
|
| @TplAction(value = "freemarker.ftl")
| public Map<String, Object> dashboard() {
| Map<String, Object> map = new HashMap<>();
| Map<String, Object> mp = new LinkedHashMap<>();
| mp.put("annotation", 'E');
| mp.put("core", 'R');
| mp.put("auth", 'U');
| mp.put("web", 'P');
| mp.put("mongodb", 'T');
| mp.put("bi", '-');
| mp.put("job", '-');
| mp.put("tpl", '-');
| mp.put("generator", '-');
| map.put("color", new String[]{
| "#eb776e", "#56aad6", "#69d5e7", "#f686e5", "#29ae94", "#fbd364",
| "#4da1ff", "#ff6e4b", "#ffc524", "#e07de9", "#42e9e1", "#a9f", "#a90",
| "#09f", "#928bff"
| });
| map.put("map", mp);
| return map;
| }
|
| }
|
|