|
@@ -0,0 +1,37 @@
|
|
|
+package org.datagear.web.controller;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.ui.Model;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+import static org.datagear.web.controller.AbstractController.CONTENT_TYPE_JSON;
|
|
|
+
|
|
|
+@Controller
|
|
|
+@RequestMapping("/dataSet/getIp")
|
|
|
+public class GetIpControllerForDataSet {
|
|
|
+ @Value("${lab2}")
|
|
|
+ String ip;
|
|
|
+
|
|
|
+ @RequestMapping(value ="/getIp")
|
|
|
+ @ResponseBody
|
|
|
+ public Object getIp(){
|
|
|
+ Map map=new HashMap();
|
|
|
+ map.put("ip",ip);
|
|
|
+ return map;
|
|
|
+ }
|
|
|
+// @RequestMapping(value = "/changeLocale", produces = CONTENT_TYPE_JSON)
|
|
|
+// @ResponseBody
|
|
|
+// public Object changeLocale(HttpServletRequest request, HttpServletResponse response)
|
|
|
+// {
|
|
|
+// Map<String, Object> map = new HashMap<>();
|
|
|
+// map.put("status", "ok");
|
|
|
+// return map;
|
|
|
+// }
|
|
|
+}
|