Spring Cloud Alibaba | Sentinel 流量监控与防御
- spring cloud
- 2021-05-23 13:32:28
- 浏览 600
简介质变的积累,才有量变的爆发。你没有时间可以浪费!
引入依赖
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
配置
spring:
cloud:
sentinel:
transport:
port: 8719
dashboard: 10.249.1.254:9080
port 为服务公布给 sentinel 访问的端口
dashboard sentinel监控控制台地址
注解资源
@SentinelResource(value = "detail")
注解一般在方法上添加
控制台
访问一下相关资源,控制台才会显示
上一篇:MyCat | 读写分离
下一篇:绝世美姿 | 规范脊椎姿势