This commit is contained in:
ybw 2023-03-22 10:22:29 +08:00
parent 16a4be6cd0
commit 7919746e55
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,19 @@
server:
port: 8080
spring:
application:
name: gateway
cloud:
gateway:
routes:
- id: user-service
uri: http://localhost:8083
order: 0
predicates:
- Path=/test/**
filters:
# 关键在下面一句值为true则开启认证false则不开启
# 这种配置方式和spring cloud gateway内置的GatewayFilterFactory一致即AuthorizeGatewayFilterFactory去掉GatewayFilterFactory
- Authorize=true
- StripPrefix=1

View File

@ -0,0 +1,5 @@
server:
port: 8083
spring:
application:
name: member-web