diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java index 96cdacea2..30df9f67b 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-a/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java @@ -65,9 +65,9 @@ public class QuickstartCalleeController { * @return sum */ @GetMapping("/sum") - public int sum(@RequestParam int value1, @RequestParam int value2) { + public String sum(@RequestParam int value1, @RequestParam int value2) { LOG.info("Quickstart Callee Service [{}:{}] is called and sum is [{}].", ip, port, value1 + value2); - return value1 + value2; + return String.format("Quickstart Callee Service [%s:%s] is called and sum is [%s].", ip, port, value1 + value2); } /** diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java index 86df17d59..9d97dfd89 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-callee-service-b/src/main/java/com/tencent/cloud/quickstart/callee/QuickstartCalleeController.java @@ -69,9 +69,9 @@ public class QuickstartCalleeController { * @return sum */ @GetMapping("/sum") - public int sum(@RequestParam int value1, @RequestParam int value2) { + public String sum(@RequestParam int value1, @RequestParam int value2) { LOG.info("Quickstart Callee Service [{}:{}] is called and sum is [{}].", ip, port, value1 + value2); - return value1 + value2; + return String.format("Quickstart Callee Service [%s:%s] is called and sum is [%s].", ip, port, value1 + value2); } /** diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java index 58d4cc650..f210fb546 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeService.java @@ -37,5 +37,5 @@ public interface QuickstartCalleeService { * @return sum */ @GetMapping("/quickstart/callee/sum") - int sum(@RequestParam("value1") int value1, @RequestParam("value2") int value2); + String sum(@RequestParam("value1") int value1, @RequestParam("value2") int value2); } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java index 1c806faac..8f680a8db 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCalleeServiceFallback.java @@ -28,7 +28,7 @@ public class QuickstartCalleeServiceFallback implements QuickstartCalleeService { @Override - public int sum(int value1, int value2) { - return 0; + public String sum(int value1, int value2) { + return "sum is 0."; } } diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java index a0c17faa2..ec939dd17 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-caller-service/src/main/java/com/tencent/cloud/quickstart/caller/QuickstartCallerController.java @@ -62,7 +62,7 @@ public class QuickstartCallerController { * @return sum */ @GetMapping("/feign") - public int feign(@RequestParam int value1, @RequestParam int value2) { + public String feign(@RequestParam int value1, @RequestParam int value2) { return quickstartCalleeService.sum(value1, value2); }