Commit 10afa777 by Nepxion

提供测试接口

parent 42bfc93d
......@@ -31,13 +31,18 @@ public class ARestImpl extends AbstractRestImpl {
private RestTemplate restTemplate;
@RequestMapping(path = "/rest", method = RequestMethod.POST)
@SentinelResource("sentinel-resource")
@SentinelResource("sentinel-resource")
public String rest(@RequestBody String value) {
value = doRest(value);
value = restTemplate.postForEntity("http://discovery-springcloud-example-b/rest", value, String.class).getBody();
value = restTemplate.postForEntity("http://discovery-springcloud-example-b/rest", value, String.class).getBody();
LOG.info("调用路径:{}", value);
return value;
}
@RequestMapping(path = "/test", method = RequestMethod.POST)
public String test(@RequestBody String value) {
return value;
}
}
\ No newline at end of file
......@@ -31,13 +31,18 @@ public class BRestImpl extends AbstractRestImpl {
private RestTemplate restTemplate;
@RequestMapping(path = "/rest", method = RequestMethod.POST)
@SentinelResource("sentinel-resource")
@SentinelResource("sentinel-resource")
public String rest(@RequestBody String value) {
value = doRest(value);
value = restTemplate.postForEntity("http://discovery-springcloud-example-c/rest", value, String.class).getBody();
value = restTemplate.postForEntity("http://discovery-springcloud-example-c/rest", value, String.class).getBody();
LOG.info("调用路径:{}", value);
return value;
}
@RequestMapping(path = "/test", method = RequestMethod.POST)
public String test(@RequestBody String value) {
return value;
}
}
\ No newline at end of file
......@@ -34,4 +34,9 @@ public class CRestImpl extends AbstractRestImpl {
return value;
}
@RequestMapping(path = "/test", method = RequestMethod.POST)
public String test(@RequestBody String value) {
return value;
}
}
\ No newline at end of file
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