diff --git a/CHANGELOG.md b/CHANGELOG.md index 583ae950b..cd39a4d07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,3 +35,4 @@ - [docs:simplify GitHub Actions.](https://github.com/Tencent/spring-cloud-tencent/pull/1553) - [feat: support config event.](https://github.com/Tencent/spring-cloud-tencent/pull/1558) - [feat:support stat and event report with service discovery.](https://github.com/Tencent/spring-cloud-tencent/pull/1560) +- [fix: add gateway context config example.](https://github.com/Tencent/spring-cloud-tencent/pull/1561) \ No newline at end of file diff --git a/spring-cloud-starter-tencent-polaris-config/pom.xml b/spring-cloud-starter-tencent-polaris-config/pom.xml index 5f1a7a46e..7caad9eb1 100644 --- a/spring-cloud-starter-tencent-polaris-config/pom.xml +++ b/spring-cloud-starter-tencent-polaris-config/pom.xml @@ -18,12 +18,6 @@ com.tencent.cloud spring-cloud-tencent-polaris-context - - - spring-security-crypto - org.springframework.security - - diff --git a/spring-cloud-starter-tencent-polaris-discovery/pom.xml b/spring-cloud-starter-tencent-polaris-discovery/pom.xml index c2c532ec6..99098755e 100644 --- a/spring-cloud-starter-tencent-polaris-discovery/pom.xml +++ b/spring-cloud-starter-tencent-polaris-discovery/pom.xml @@ -54,12 +54,6 @@ org.springframework.cloud spring-cloud-starter-netflix-ribbon - - - spring-security-rsa - org.springframework.security - - diff --git a/spring-cloud-tencent-commons/pom.xml b/spring-cloud-tencent-commons/pom.xml index 853a2ffce..cbaafc212 100644 --- a/spring-cloud-tencent-commons/pom.xml +++ b/spring-cloud-tencent-commons/pom.xml @@ -45,6 +45,12 @@ org.springframework.cloud spring-cloud-commons + + + spring-security-crypto + org.springframework.security + + diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/application-context.yml b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/application-context.yml index 5b90a3e2d..eb246ea63 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/application-context.yml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/application-context.yml @@ -3,10 +3,10 @@ spring: tencent: gateway: groups: - group-scg2p: + group-callee: predicate: apiType: ms - context: /group1 + context: /group-callee namespace: key: null position: PATH @@ -15,17 +15,42 @@ spring: position: PATH routes: - host: null - metadata: {} + metadata: { } method: GET namespace: default - path: /echo/{param} - service: provider-demo + path: /quickstart/callee/info + service: QuickstartCalleeService + group-caller: + predicate: + apiType: ms + context: /group-caller + namespace: + key: null + position: PATH + service: + key: null + position: PATH + routes: + - host: null + metadata: { } + method: GET + namespace: default + path: /quickstart/** + service: QuickstartCallerService routes: - group1: + group-callee: + filters: + - Context=group-callee + order: -1 + predicates: + - Context=group-callee + - Path=/group-callee/** + uri: lb://group-callee # do not use "_". + group-caller: filters: - - Context=group1 + - Context=group-caller order: -1 predicates: - - Context=group1 - - Path=/group1/** - uri: lb://group1 + - Context=group-caller + - Path=/group-caller/** + uri: lb://group-caller # do not use "_". diff --git a/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/bootstrap.yml b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/bootstrap.yml index 995e2eb5e..8ca2705d3 100644 --- a/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/bootstrap.yml +++ b/spring-cloud-tencent-examples/quickstart-example/quickstart-gateway-service/src/main/resources/bootstrap.yml @@ -1,6 +1,8 @@ server: port: 48081 spring: +# profiles: +# active: context application: name: QuickStartGatewayService cloud: