springcloud-alibaba Sentinel入门

Releases · alibaba/Sentinel · GitHubSentinel下载官方

在cmd 里面运行 启动命令

java -jar sentinel-dashboard-1.8.6.jar

启动成功前提 java环境 ,已经注册到服务注册中心,8080端口没有被占用

启动后访问地址为

qhttp://localhost:8080http://localhost:8080登录密码均为sentinel

maven依赖

XML 复制代码
   <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
        </dependency>
        <!--nacos-discovery-->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
        </dependency>

yaml配置

XML 复制代码
server:
  port: 8401

spring:
  application:
    name: cloudalibaba-sentinel-service
  cloud:
    nacos:
      discovery:
        server-addr: localhost:8848         #Nacos服务注册中心地址
    sentinel:
      transport:
        dashboard: localhost:8080 #配置Sentinel dashboard控制台服务地址
        port: 8719 #默认8719端口,假如被占用会自动从8719开始依次+1扫描,直至找到未被占用的端口

Sentinel采用的是懒加载机制,需要访问几次接口才能在界面中看到服务

相关推荐
知兀1 天前
【Spring/SpringBoot】<dependencyManagement> + import 导入能继承父maven项目的所有依赖,类似parent
spring boot·spring·maven
源码宝1 天前
企业项目级医院随访系统源码,患者随访管理系统,技术框架:Java+Spring boot,Vue,Ant-Design+MySQL5
java·vue.js·spring·程序·医院管理系统·随访·随访系统源码
A.说学逗唱的Coke1 天前
【观察者模式】深入 Spring 事件驱动模型:从入门到微服务整合实战
spring·观察者模式·微服务
lzjava20241 天前
Spring AI使用知识库增强对话功能
人工智能·python·spring
ToPossessLight09021 天前
Spring 容器的基本实现
spring
程序定小飞1 天前
基于springboot的学院班级回忆录的设计与实现
java·vue.js·spring boot·后端·spring
郝开1 天前
Spring Boot 2.7.18(最终 2.x 系列版本)1 - 技术选型:连接池技术选型对比;接口文档技术选型对比
java·spring boot·spring
知兀1 天前
【Spring/SpringBoot】SSM(Spring+Spring MVC+Mybatis)方案、各部分职责、与Springboot关系
java·spring boot·spring
论迹1 天前
【Spring Cloud 微服务】-- 服务拆分原则
java·spring cloud·微服务
伊布拉西莫1 天前
Spring 6.x HTTP interface 使用说明
spring·restclient