sentinel使用控制台实现

1、添加依赖

<!-- 整合控制台 -->
<dependency >
<groupId >com.alibaba.csp</groupId >
<artifactId >sentinel-transport-simple-http</artifactId >
<version >1.8.0</version >
</dependency >

此项方法,只是单独的添加整合sentinel控制台

SpringCloudAlibaba整合了的,只需要添加:

<!--sentinel 依赖 -->
<dependency >
<groupId >com.alibaba.cloud</groupId >
<artifactId >spring-cloud-starter-alibaba-sentinel</artifactId >
</dependency >

2、下载控制台jar包

Releases · alibaba/Sentinel · GitHub 此处选择使用1.8.0

3、启动

java -jar sentinel-dashboard-1.8.0.jar

用户可以通过如下参数进行配置:

###用于定指控制台的端口,默认为8080

-Dserver.port=8080

###用于指定控制台的登录用户名为 sentinel

-Dsentinel.dashboard.auth.username=sentinel

###用于指定控制台的登录密码为 123456

-Dsentinel.dashboard.auth.password=123456

###用于指定 Spring Boot 服务端 session 的过期时间,如 7200 表示 7200 秒;60m 表示 60 分钟, 默认为 30 分钟

-Dserver.servlet.session.timeout=7200

4、访问地址

默认地址:http://localhost:8080/#/login

默认用户名/密码:sentinel/sentinel

5、项目整合sentinel

初始化登录以后,无任何的菜单数据,因为没有服务整合使用了这个控制台。需要调用了项目相关的接口才会有对应数据。

相关推荐
心之语歌2 小时前
Sentinel 断路器在Spring Cloud使用
spring·spring cloud·sentinel
程序猿零零漆5 天前
SpringCloud系列教程:微服务的未来(十八)雪崩问题、服务保护方案、Sentinel快速入门
spring cloud·微服务·sentinel
Forest 森林5 天前
【微服务与分布式实践】探索 Sentinel
sentinel
LUCIAZZZ5 天前
SpringCloudGateWay和Sentinel结合做黑白名单来源控制
sentinel
kerwin_code7 天前
Sentinel 控制台集成 Nacos 实现规则配置双向同步和持久化存储(提供改造后源码)
java·sentinel
kerwin_code9 天前
SpringCloudAlibaba 服务保护 Sentinel 项目集成实践
java·sentinel
ChinaRainbowSea10 天前
10. SpringCloud Alibaba Sentinel 规则持久化部署详细剖析
java·spring·spring cloud·sentinel·负载均衡
等一场春雨10 天前
Alibaba Spring Cloud 十七 Sentinel熔断降级
spring·spring cloud·sentinel
kerwin_code12 天前
SpringCloud Gateway 集成 Sentinel 详解 及实现动态监听Nacos规则配置实时更新流控规则
spring cloud·gateway·sentinel
ps酷教程13 天前
sentinel微服务保护
微服务·架构·sentinel