Commit b5e0e503 authored by Quxl's avatar Quxl

x

parent 1a24f0b8
......@@ -6,6 +6,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
......@@ -13,12 +14,22 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping
public class TestController {
@Value("${spring.profiles.active}")
private String profiles;
@Autowired
ZMISD009SOCREATIONTask task;
private void verify() {
if(profiles.contains("pro")) {
throw new RuntimeException("测试接口已关闭");
}
}
@RequestMapping(method = {RequestMethod.GET, RequestMethod.POST})
public String list(HttpServletRequest request) {
this.verify();
StringBuffer url = request.getRequestURL();
System.out.println(url);
Map<String, String> map = new LinkedHashMap<String, String>();
......@@ -34,6 +45,7 @@ public class TestController {
@RequestMapping(value= {"/009_SO_CREATION"}, method = {RequestMethod.GET, RequestMethod.POST})
public String executeZMISD009SOCREATIONTask() {
this.verify();
task.runTask();
return "OK";
}
......
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