Skip to content

fix: gramma issues for lane router example & optimize the gateway dependency #1343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- [feat: support lane router](https://github.com/Tencent/spring-cloud-tencent/pull/1339)
- [feat: add lane router examples](https://github.com/Tencent/spring-cloud-tencent/pull/1340)
- [fix: fix the lossless provider override in multiple registries scenario](https://github.com/Tencent/spring-cloud-tencent/pull/1341)
- [fix:fix nearby router properties loading bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1342)
- [fix:fix nearby router properties loading bug.](https://github.com/Tencent/spring-cloud-tencent/pull/1342)
- [fix: fix grammar issues for lane router example & optimize the gateway dependency](https://github.com/Tencent/spring-cloud-tencent/pull/1343)
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public class LaneRouterCalleeController {
*/
@GetMapping("/sum")
public String sum(@RequestParam int value1, @RequestParam int value2) {
LOG.info("Lane {} Callee Service [{}:{}] is called and sum is [{}].", lane, ip, port, value1 + value2);
return String.format("Lane %s Callee Service [%s:%s] is called and sum is [%s].", 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:%s] is called and sum is [%s].", lane, appName, ip, port, value1 + value2);
}

/**
Expand All @@ -69,8 +69,8 @@ public String sum(@RequestParam int value1, @RequestParam int value2) {
*/
@GetMapping("/info")
public String info() {
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);
LOG.info("Lane [{}] Service [{} - {}:{}] is called.", lane, appName, ip, port);
return String.format("Lane [%s] Service [%s - %s:%s] is called.", lane, appName, ip, port);
}

/**
Expand All @@ -85,7 +85,7 @@ public String echoHeader(@RequestHeader(MetadataConstant.HeaderName.CUSTOM_METAD
throws UnsupportedEncodingException {
LOG.info(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);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class LaneRouterCallerController {
@GetMapping("/feign")
public String feign(@RequestParam int value1, @RequestParam int 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);
}

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

/**
Expand All @@ -99,8 +99,8 @@ public Mono<String> webclient() {
*/
@GetMapping("/info")
public String info() {
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);
LOG.info("Lane {} Service [{} - {}:{}] is called.", lane, appName, ip, port);
return String.format("Lane [%s] Service [%s - %s:%s] is called.", lane, appName, ip, port);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@
<artifactId>spring-cloud-starter-tencent-polaris-router</artifactId>
</dependency>

<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-gateway-plugin</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-gateway</artifactId>
Expand Down
Loading