fix: add gateway context config example. (#1563)

pull/1590/head
Fishtail 3 months ago committed by GitHub
parent b614687065
commit 2bac402116
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,3 +1,5 @@
# Change Log
---
- [fix: add gateway context config example.](https://github.com/Tencent/spring-cloud-tencent/pull/1563)

@ -18,12 +18,6 @@
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-polaris-context</artifactId>
<exclusions>
<exclusion>
<artifactId>spring-security-crypto</artifactId>
<groupId>org.springframework.security</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Spring Cloud Tencent dependencies end -->

@ -18,12 +18,6 @@
<dependency>
<groupId>com.tencent.cloud</groupId>
<artifactId>spring-cloud-tencent-rpc-enhancement</artifactId>
<exclusions>
<exclusion>
<artifactId>spring-security-crypto</artifactId>
<groupId>org.springframework.security</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>

@ -45,6 +45,12 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
<exclusions>
<exclusion>
<artifactId>spring-security-crypto</artifactId>
<groupId>org.springframework.security</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>

@ -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 "_".

@ -1,6 +1,8 @@
server:
port: 48081
spring:
# profiles:
# active: context
application:
name: QuickStartGatewayService
config:

@ -39,6 +39,12 @@
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-loadbalancer</artifactId>
<exclusions>
<exclusion>
<artifactId>spring-security-crypto</artifactId>
<groupId>org.springframework.security</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>

Loading…
Cancel
Save