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

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

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

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

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

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

@ -3,10 +3,10 @@ spring:
tencent: tencent:
gateway: gateway:
groups: groups:
group-scg2p: group-callee:
predicate: predicate:
apiType: ms apiType: ms
context: /group1 context: /group-callee
namespace: namespace:
key: null key: null
position: PATH position: PATH
@ -15,17 +15,42 @@ spring:
position: PATH position: PATH
routes: routes:
- host: null - host: null
metadata: {} metadata: { }
method: GET method: GET
namespace: default namespace: default
path: /echo/{param} path: /quickstart/callee/info
service: provider-demo service: QuickstartCalleeService
group-caller:
predicate:
apiType: ms
context: /group-caller
namespace:
key: null
position: PATH
service:
key: null
position: PATH
routes: routes:
group1: - host: null
metadata: { }
method: GET
namespace: default
path: /quickstart/**
service: QuickstartCallerService
routes:
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: filters:
- Context=group1 - Context=group-caller
order: -1 order: -1
predicates: predicates:
- Context=group1 - Context=group-caller
- Path=/group1/** - Path=/group-caller/**
uri: lb://group1 uri: lb://group-caller # do not use "_".

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

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

Loading…
Cancel
Save