forked from JoyChou93/java-sec-code
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndex.java
More file actions
32 lines (25 loc) · 770 Bytes
/
Index.java
File metadata and controls
32 lines (25 loc) · 770 Bytes
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
package org.joychou.controller;
import com.alibaba.fastjson.JSON;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.HashMap;
import java.util.Map;
/**
* @author: JoyChou (joychou@joychou.org)
* @date: 2018.05.28
* @desc: Index Page
*/
@Controller
public class Index {
@RequestMapping("/")
@ResponseBody
public static String index() {
Map m = new HashMap();
m.put("app_name", "java_vul_code");
m.put("java_version", System.getProperty("java.version"));
m.put("fastjson_version", JSON.VERSION);
// covert map to string
return JSON.toJSONString(m);
}
}