您现在的位置是:首页 > 学无止境 > Spring Cloud

spring cloud alibaba(6)基础-Sentinel 控制台搭建

贾继涛 2019-03-11 1073人围观

相关文章

 spring cloud alibaba(1)基础注册中心nacos

 spring cloud alibaba(2)基础-服务提供者

 spring cloud alibaba(3)基础-创建消费者

 spring cloud alibaba(4)基础-创建消费者(feign)

 spring cloud alibaba(5)基础-熔断器防止雪崩sentinel

 spring cloud alibaba(6)基础-Sentinel 控制台搭建

 spring cloud alibaba(7)基础-Spring Cloud Gateway网关

 spring cloud alibaba(8)基础-geteway路由全局过滤

 spring cloud alibaba(9)基础-nacos云配置服务-nacos-config

 spring cloud alibaba(10)基础-Nacos Config多环境配置

  1. 下载源码 

git clone https://github.com/alibaba/Sentinel.git

2.进入sentinel-dashboard 文件夹下打包,如果打包不成功请修改pom中的版本

 <parent>
        <groupId>com.alibaba.csp</groupId>
        <artifactId>sentinel-parent</artifactId>
        <version>1.4.2</version>
  </parent>
mvn clean package -Dmaven.test.skip=true

3.启动

cd sentinel-dashboard\target
java -Dserver.port=8080 -Dcsp.sentinel.dashboard.server=localhost:8080 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard.jar

4.打开

打开浏览器访问:http://localhost:8080/#/dashboard/home

5.application.yml配置

spring:
  cloud:
    sentinel:
      transport:
        port: 8719
        dashboard: localhost:8080
spring:
  application:
    name: nacos-consumer-feign
 
  cloud:
    nacos:
      discovery:
        server-addr: 127.0.0.1:8848
    sentinel:
      transport:
        port: 8720
        dashboard: localhost:8080
server:
  port: 9092
feign:
  sentinel:
    enabled: true
management:
  endpoints:
    web:
      exposure:
        include: "*"

源码地址

 https://gitee.com/jiajitao/Spring-Cloud-Ali


您的支持