怎么接入sentinel
1、首先你要有 sentinel的依赖
2、然后你要在配置邮件里加入 sentinel的配置
spring:
cloud:
sentinel:
eager: true
transport:
dashboard: website-sentinel-svc:7001
datasource:
ds-flow:
nacos:
namespace: b2c-sentinel
serverAddr: ${spring.cloud.nacos.server-addr}
dataId: ${spring.application.name}-flow-rules
groupId: b2c-sentinel
rule-type: flow
username: sentinel
password: yunwei2011
ds-degrade:
nacos:
namespace: b2c-sentinel
serverAddr: ${spring.cloud.nacos.server-addr}
dataId: ${spring.application.name}-degrade-rules
groupId: b2c-sentinel
rule-type: degrade
username: sentinel
password: yunwei2011
ds-system:
nacos:
namespace: b2c-sentinel
serverAddr: ${spring.cloud.nacos.server-addr}
dataId: ${spring.application.name}-system-rules
groupId: b2c-sentinel
rule-type: system
username: sentinel
password: yunwei2011
3、最后你要把sentinel dashboard 上发现的 资源加上流控规则(@sentinel标注的)