Spring Cloud Alibaba 版本对照表,集成nacos,sentinel,seata

 一、Spring Cloud Alibaba 版本对照网址

https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E

 

二、集成nacos

nacos源码编译打包_qq_41369135的博客-CSDN博客

连接mysql

nacos\conf下的application.properties

spring.datasource.platform=mysql

db.num=1
db.url.0=jdbc:mysql://localhost:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
db.user=root
db.password=123456

然后导入sql文件(conf/nacos-mysql.sql)

修改为单机启动(bin/startup.cmd)

修改启动内存大小

 修改密码(直接数据库修改)

数据采用的是BCrypt加密 我们可以找一个网站输入自定义密码 然后加密 把加密后的密码存到数据库中user表中

Bcrypt密码在线生成计算器 http://www.ab126.com/goju/10822.html

自定义用户名和密码输入保存,然后重启nacos 。

启动(双击startup.cmd)

输入localhost:8848/nacos

三、集成sentinel 

重学SpringCloud系列八之分布式系统流量卫兵sentinel - 腾讯云开发者社区-腾讯云

介绍 · alibaba/Sentinel Wiki · GitHub

window启动脚本

@echo off
d:
cd D:\alibaba\sentinel
java -Xms64m -Xmx256m -Dserver.port=8849 -Dcsp.sentinel.dashboard.server=127.0.1.1:8850 -Dcsp.sentinel.heartbeat.client.ip=127.0.1.1 -Dproject.name=sentinel-dashboard -Dsentinel.dashboard.auth.username=sentinel -Dsentinel.dashboard.auth.password=sdoqwer1poiu -Dserver.servlet.session.timeout=60m -jar sentinel-dashboard-1.8.5.jar

sentinel启动参数

-Dserver.port=8080:用于指定 Sentinel 控制台端口为 8080,如若8080端口冲突,可使用 -Dserver.port=新端口 进行设置。。
-Dcsp.sentinel.dashboard.server=localhost:8080:指定控制台地址和端口,会自动向该地址发送心跳包。地址格式为:hostIp:port,l配置成ocalhost:8080即监控自己
-Dproject.name=sentinel-dashboard:指定Sentinel控制台程序显示的名称
-Dcsp.sentinel.log.dir:指定Sentinel 日志文件目录,默认是:${user.home}/logs/csp/
-Dcsp.sentinel.api.port=xxxx:本地的 Sentinel 客户端端口(可选,默认是 8719,有冲突会尝试向后探测)。若启动多个应用,则需要通过 -Dcsp.sentinel.api.port=xxxx 指定客户端监控 API 的端口(默认是 8719)。
-Dcsp.sentinel.app.type=1:从 1.6.3 版本开始,控制台支持网关流控规则管理。启动参数以将您的服务标记为 API Gateway,在接入控制台时您的服务会自动注册为网关类型,然后您即可在控制台配置网关规则和 API 分组。

用户可以通过如下参数进行鉴权配置:
-Dsentinel.dashboard.auth.username=sentinel 用于指定控制台的登录用户名为 sentinel;
-Dsentinel.dashboard.auth.password=123456 用于指定控制台的登录密码为 123456;如果省略这两个参数,默认用户和密码均为 sentinel;
-Dserver.servlet.session.timeout=7200 用于指定 Spring Boot 服务端 session 的过期时间,如 7200 表示 7200 秒;60m 表示 60 分钟,默认为 30 分钟;

sentinel规则持久化(基于nacos实现sentinel数据持久化)

Sentinel-深度使用_kaico2018的博客-CSDN博客_sentinel 内存

猜你喜欢

转载自blog.csdn.net/qq_41369135/article/details/127869913