sentinel最简单接入【我】

下载控制台程序

https://github.com/alibaba/Sentinel/releases

 

在本地项目的pom中引入jar:

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-alibaba-sentinel</artifactId>
            <version>0.2.0.RELEASE</version>
        </dependency>    

 

然后在yml文件中,增加如下配置:

 

然后启动项目,

然后浏览器访问

http://localhost:8080

用户名密码都是 sentinel

刷新页面,就能看到左边出现项目名,及菜单了。

 

 不停用postman访问项目里的任意Controller(多访问几次),点实时监控,就能看到监控信息了。

 

posted @ 2020-09-26 00:25  戈博折刀  阅读(725)  评论(0编辑  收藏  举报