Skip to content

fenglij/spring-cloud-demo-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-cloud-demo-2

spring cloud demo(基于springcloud 2021.0.4, springboot 2.7.4) 集成组件:

  1. nacos 注册中心
  2. nacos 集中配置中心
  3. Feign 声明式服务调用
  4. Admin 应用监控
  5. 添加核心业务依赖 core-service
  6. 添加 spring cloud gateway
  7. 添加 zipkin
  8. 移除config集中配置中心
  9. 移除eureka 注册中心
  10. 移除Hystrix 熔断器
  11. redis
  12. mysql
  13. swagger2
  14. 美团CAT
  15. 阿里Sentinel流量哨兵

备注

  1. nacos(V2.1.1)使用源码编译部署
    git地址:https://github.com/alibaba/nacos.git
    官方文档地址:https://nacos.io/zh-cn/docs/quick-start.html
    控制台:http://${IP地址}:8848/nacos/#/login
  2. CAT使用war包部署tomcat,服务端版本:3.1.0
    Linux环境:
    新增目录 /data/appdatas/cat 新增文件 client.xml(server id 配置为服务端内网IP),新增文件 datasources.xml(数据库配置为具体连接信息)
    新增目录 /data/applogs/cat
    启动tomcat
    服务端配置 访问:http://服务器地址:8080/cat/s/config?op=serverConfigUpdate,配置server id 为服务端内网IP,保存
    客户端路由 访问:http://1.117.200.16:8080/cat/s/config?op=routerConfigUpdate,配置server id 为服务端内网IP,保存
    Window环境:
    目录位置和tomcat盘符一致
    注意:
    CAT默认使用5.X版本MySQL,如果使用8.X版本MySQL,需要将${TOMCAT_HOME}/webapps/cat/WEB-INF/lib 和 ${TOMCAT_HOME}/webapps/cat-home/WEB-INF/lib 目录下5.X版本驱动包置换为8.X 版本驱动包
  3. Sentinel
    Sentinel-dashboard源码改动,支持通过nacos持久化规则(分支:feature/intergration_nacos,maven打包部署)
    dashboard启动命令:nohup java -Dserver.port=8888 -Dcsp.sentinel.dashboard.server=172.17.0.11:8888 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard.jar &
    客户端添加依赖:sentinel-spring-boot-starter

About

spring cloud demo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages