Commit 2de74f82 authored by Quxl's avatar Quxl

x

parent 11a4e89b
package com.schneider_distributor; package com.egolm.sso;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
...@@ -8,16 +8,23 @@ import javax.servlet.http.HttpServletRequest; ...@@ -8,16 +8,23 @@ import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.egolm.sso.services.CommonService;
import com.schneider_distributor.ZMISD009SOCREATIONTask;
@RestController @RestController
@RequestMapping @RequestMapping
public class TestController { public class TestController {
@Value("${spring.profiles.active}") @Value("${spring.profiles.active}")
private String profiles; private String profiles;
@Autowired
private CommonService common;
@Autowired @Autowired
ZMISD009SOCREATIONTask task; ZMISD009SOCREATIONTask task;
...@@ -32,8 +39,9 @@ public class TestController { ...@@ -32,8 +39,9 @@ public class TestController {
public String list(HttpServletRequest request) { public String list(HttpServletRequest request) {
this.verify(); this.verify();
Map<String, String> map = new LinkedHashMap<String, String>(); Map<String, String> map = new LinkedHashMap<String, String>();
map.put("/", "接口列表"); map.put("/", "/");
map.put("/009_SO_CREATION", "分销商采购(特价采购)订单,EDI平台调用SAP接口上传数据"); map.put("/009_SO_CREATION", "009_SO_CREATION");
map.put("/getToken", "getToken");
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
for(String key : map.keySet()) { for(String key : map.keySet()) {
sb.append("<A HREF=\"" + key + "\">" + map.get(key) + "</A>").append("<BR/>\n"); sb.append("<A HREF=\"" + key + "\">" + map.get(key) + "</A>").append("<BR/>\n");
...@@ -49,4 +57,9 @@ public class TestController { ...@@ -49,4 +57,9 @@ public class TestController {
return "OK"; return "OK";
} }
@GetMapping("getToken")
public Object getToken() {
String token = common.getToken();
return token;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment