fix: gramma issues for lane router example & optimize the gateway dependency (#1382)

Co-authored-by: Haotian Zhang <skyebefreeman@qq.com>
Co-authored-by: andrew shan <45474304+andrewshan@users.noreply.github.com>
pull/1383/head
Fishtail 4 months ago committed by GitHub
parent c45b04ff4f
commit 6df2c4dcfe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -10,3 +10,4 @@
- [feat: add lane router examples](https://github.com/Tencent/spring-cloud-tencent/pull/1379) - [feat: add lane router examples](https://github.com/Tencent/spring-cloud-tencent/pull/1379)
- [fix: fix the lossless provider override in multiple registries scenario](https://github.com/Tencent/spring-cloud-tencent/pull/1380) - [fix: fix the lossless provider override in multiple registries scenario](https://github.com/Tencent/spring-cloud-tencent/pull/1380)
- [fix:fix nearby router properties loading bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1381) - [fix:fix nearby router properties loading bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1381)
- [fix: fix grammar issues for lane router example & optimize the gateway dependency](https://github.com/Tencent/spring-cloud-tencent/pull/1382)

@ -59,8 +59,8 @@ public class LaneRouterCalleeController {
*/ */
@GetMapping("/sum") @GetMapping("/sum")
public String sum(@RequestParam int value1, @RequestParam int value2) { public String sum(@RequestParam int value1, @RequestParam int value2) {
LOG.info("Lane {} Callee Service [{}:{}] is called and sum is [{}].", lane, ip, port, value1 + value2); LOG.info("Lane [{}] Callee Service [{} - {}:{}] is called and sum is [{}].", lane, appName, ip, port, value1 + value2);
return String.format("Lane %s Callee Service [%s:%s] is called and sum is [%s].", lane, ip, port, value1 + value2); return String.format("Lane [%s] Callee Service [%s - %s:%s] is called and sum is [%s].", lane, appName, ip, port, value1 + value2);
} }
/** /**
@ -69,8 +69,8 @@ public class LaneRouterCalleeController {
*/ */
@GetMapping("/info") @GetMapping("/info")
public String info() { public String info() {
LOG.info("Lane {} [{}] Service [{}:{}] is called.", lane, appName, ip, port); LOG.info("Lane [{}] Service [{} - {}:{}] is called.", lane, appName, ip, port);
return String.format("Lane %s [%s] Service [%s:%s] is called.", lane, appName, ip, port); return String.format("Lane [%s] Service [%s - %s:%s] is called.", lane, appName, ip, port);
} }
/** /**
@ -85,7 +85,7 @@ public class LaneRouterCalleeController {
throws UnsupportedEncodingException { throws UnsupportedEncodingException {
LOG.info(URLDecoder.decode(metadataStr, UTF_8)); LOG.info(URLDecoder.decode(metadataStr, UTF_8));
metadataStr = URLDecoder.decode(metadataStr, UTF_8); metadataStr = URLDecoder.decode(metadataStr, UTF_8);
return String.format("Lane %s: %s", lane, metadataStr); return String.format("Lane [%s]: %s", lane, metadataStr);
} }
} }

@ -66,7 +66,7 @@ public class LaneRouterCallerController {
@GetMapping("/feign") @GetMapping("/feign")
public String feign(@RequestParam int value1, @RequestParam int value2) { public String feign(@RequestParam int value1, @RequestParam int value2) {
String value = quickstartCalleeService.sum(value1, value2); String value = quickstartCalleeService.sum(value1, value2);
return String.format("Lane %s Caller Service %s: %s", lane, appName, value); return String.format("Lane [%s] Caller Service [%s - %s:%s] -> %s", lane, appName, ip, port, value);
} }
/** /**
@ -75,8 +75,8 @@ public class LaneRouterCallerController {
*/ */
@GetMapping("/rest") @GetMapping("/rest")
public String rest() { public String rest() {
String value = restTemplate.getForObject("http://QuickstartCalleeService/quickstart/callee/info", String.class); String value = restTemplate.getForObject("http://LaneCalleeService/lane/callee/info", String.class);
return String.format("Lane %s Caller Service %s: %s", lane, appName, value); return String.format("Lane [%s] Caller Service [%s - %s:%s] -> %s", lane, appName, ip, port, value);
} }
/** /**
@ -99,8 +99,8 @@ public class LaneRouterCallerController {
*/ */
@GetMapping("/info") @GetMapping("/info")
public String info() { public String info() {
LOG.info("Lane {} [{}] Service [{}:{}] is called.", lane, appName, ip, port); LOG.info("Lane {} Service [{} - {}:{}] is called.", lane, appName, ip, port);
return String.format("Lane %s [%s] Service [%s:%s] is called.", lane, appName, ip, port); return String.format("Lane [%s] Service [%s - %s:%s] is called.", lane, appName, ip, port);
} }
/** /**

@ -23,11 +23,6 @@
<artifactId>spring-cloud-starter-tencent-polaris-router</artifactId> <artifactId>spring-cloud-starter-tencent-polaris-router</artifactId>
</dependency> </dependency>
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-gateway-plugin</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId> <artifactId>spring-cloud-starter-gateway</artifactId>

Loading…
Cancel
Save