feat:gateway整合sentinel

This commit is contained in:
haoxr 2021-04-05 23:59:32 +08:00
parent 3dc9621c99
commit 5918fd5feb
3 changed files with 5 additions and 6 deletions

View File

@ -12,3 +12,4 @@ spring:
server-addr: ${spring.cloud.nacos.discovery.server-addr}
file-extension: yaml

View File

@ -68,6 +68,7 @@
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.csp</groupId>
<artifactId>sentinel-datasource-nacos</artifactId>

View File

@ -16,9 +16,9 @@ spring:
sentinel:
eager: true
transport:
dashboard: e.youlai.tech:8858
dashboard: localhost:8080
datasource:
# 网关限流
# 网关限流规则gw-flow为key随便定义
gw-flow:
nacos:
server-addr: ${spring.cloud.nacos.discovery.server-addr}
@ -34,9 +34,6 @@ spring:
groupId: SENTINEL_GROUP
data-type: json
rule-type: gw-api-group
enabled: false