This commit is contained in:
翟永超
2016-07-22 16:33:15 +08:00
parent aaea217048
commit a8a20a76cb
5 changed files with 108 additions and 4 deletions
@@ -18,11 +18,11 @@ public class ComputeController {
private DiscoveryClient client;
@RequestMapping(value = "/add" ,method = RequestMethod.GET)
public Integer add(@RequestParam Integer a, @RequestParam Integer b) {
public String add(@RequestParam Integer a, @RequestParam Integer b) {
ServiceInstance instance = client.getLocalServiceInstance();
Integer r = a + b;
logger.info("/add, host:" + instance.getHost() + ", service_id:" + instance.getServiceId() + ", result:" + r);
return r;
return "From Service-A, Result is " + r;
}
}