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规则持久化
java·spring cloud·sentinel
小马爱记录2 天前
Sentinel微服务保护
spring cloud·微服务·架构·sentinel
爱编程的张同学5 天前
OpenFeign和Gateway集成Sentinel实现服务降级
spring cloud·sentinel
运维老曾6 天前
Redis-6.2.9 Sentinel 哨兵配置
redis·sentinel
曼彻斯特的海边6 天前
spring-cloud-alibaba-sentinel-gateway
gateway·sentinel·springcloud
xujinwei_gingko6 天前
微服务-Sentinel
微服务·sentinel
_r0bin_10 天前
Sentinel
sentinel
LL小蜗牛10 天前
Alibaba Sentinel 入门教程:从理论到实战
sentinel
飞飞98710 天前
spring sentinel
java·spring·sentinel
cui_hao_nan11 天前
Sentinel限流熔断机制实战
java·sentinel