大致框架
- 服务注册与发现:Eureka、Zookeeper、Consul、Nacos
- 服务负载与调用:ribbon、LoadBalancer、Feign、OpenFeign
- 服务熔断降级:hysirix、resilience4j、sentinel
- 服务网关:zuul、gateway
- 服务分布式配置:SpringCloud Config、Apollo、Nacos
- 服务总线:Bus、Nacos
- 服务开发:SpringBoot
版本对照
SpringCloud 与 SpringBoot 版本对照
- 当前 SpringCloud 版本稳定版推荐 2021.0.5、点击 Reference Doc. 即可得到对应版本的详细文档 对应的 SpringBoot 版本推荐 2.6.13
- 目前已经不在继续采用字母A-Z形式命名版本了,直接用年份
- SpringCloud 官网
- 详细版对照版本
SpringCloud 和 SpringCloudAlibaba 版本对照
创建 SpringCloud 项目
创建父类 Maven 框架
修改父工程的 pom 文件、注意版本依赖关系、删掉 src 文件
创建多个子工程模块
- 建 module (可以是Spring Initializr 或者 new Module)
- 改 pom (参考 DependencyManager 的用法)
- 写 YML
- 主启动类
- 业务类
补充
可以隐藏 .idea 文件
- 因为项目体量大,只需要留下可修改部分即可
services 里面显示多个服务,方便管理和启动
- 如何显示: View --》 Tool Windows --》 Services --》 Run Configuration Type --》 SpringBoot