From 147fd21fcf4e6de2bd0b41fb2a5d267875f153d0 Mon Sep 17 00:00:00 2001 From: andrew shan <45474304+andrewshan@users.noreply.github.com> Date: Thu, 18 Jul 2024 16:42:24 +0800 Subject: [PATCH] fix: rollback info changes --- .../callee/QuickstartCalleeController.java | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) 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 90e8359e2..189bbbe71 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 @@ -63,8 +63,6 @@ public class QuickstartCalleeController { private boolean ifBadGateway = true; private boolean ifDelay = true; - private boolean isInfoSuccess = true; - /** * Get sum of two value. * @param value1 value 1 @@ -83,13 +81,8 @@ public class QuickstartCalleeController { */ @GetMapping("/info") public ResponseEntity info() { - if (isInfoSuccess) { - LOG.info("Quickstart [{}] Service [{}:{}] is called. datasource = [{}].", appName, ip, port, dataSourceProperties); - return new ResponseEntity<>(String.format("Quickstart [%s] Service [%s:%s] is called. datasource = [%s].", appName, ip, port, dataSourceProperties), HttpStatus.OK); - } - else { - return new ResponseEntity<>(String.format("Failed to call quickstart [%s] service [%s:%s]. datasource = [%s].", appName, ip, port, dataSourceProperties), HttpStatus.BAD_GATEWAY); - } + LOG.info("Quickstart [{}] Service [{}:{}] is called. datasource = [{}].", appName, ip, port, dataSourceProperties); + return new ResponseEntity<>(String.format("Quickstart [%s] Service [%s:%s] is called. datasource = [%s].", appName, ip, port, dataSourceProperties), HttpStatus.OK); } /** @@ -173,19 +166,6 @@ public class QuickstartCalleeController { } } - @GetMapping("/setInfoSuccess") - public String setInfoSuccess(@RequestParam boolean param) { - this.isInfoSuccess = param; - if (param) { - LOG.info("infoSuccess is set to true."); - return "infoSuccess is set to true."; - } - else { - LOG.info("infoSuccess is set to false."); - return "infoSuccess is set to false."; - } - } - @GetMapping("/faultDetect") public ResponseEntity health() throws InterruptedException { if (ifBadGateway) {