Skip to the content.

Spring Cloud Mesh

该项目包含开发分布式应用微服务的必需组件,通过 Spring Cloud 架构模型 和相关 Spring Cloud 组件来开发分布式应用服务。

主要功能

组件

组织结构

spring-cloud
├── mesh-api -- openFeign 相关接口 api
├── mesh-auth-server -- 认证系统
├── mesh-boot-admin -- 服务健康与监控系统
├── mesh-common -- 工具类及通用代
├── mesh-docs -- 项目文档信息
├── mesh-demo -- 相关框架实例
├────── nacos-sample -- 栗子1
├────── seata-eureka-sample -- 栗子2
├────── seata-ha-sample -- 栗子3
├────── seata-nacos-sample -- 栗子4
├────── seata-sample -- 栗子5
├────── seata-tcc-sample -- 栗子6
├────── springboot-sample -- 栗子7
├── mesh-entity -- 数据层公共实体类
├── mesh-enums -- 枚举公共类
├── mesh-eureka -- Eureka 服务注册与发现组件
├── mesh-gateway -- SpringCloud Gateway 网关组件
├── mesh-gateway-zuul -- SpringCloud Zuul 网关组件
├── mesh-generator -- Mybatis 构建自动化
├── mesh-model -- 与前端交互视图实体相关,VO、DTO、BTO
├── mesh-modules -- 模块集
├────── mesh-async-elasticsearch
├────── mesh-elasticsearch -- 全文搜索引擎 Elasticsearch
├────── mesh-mongodb
├────── mesh-cassandra
├── mesh-core -- 服务层公共配置信息和组件初始化代码
├── mesh-service -- 独立服务父 POM
├────── mesh-business-service -- 独立业务服务1
├────── mesh-order-service -- 独立业务服务2
├────── mesh-storage-service -- 独立业务服务3
├────── mesh-user-service -- 独立业务服务4
├────── mesh-mybatis-service -- 独立业务服务5
├── mesh-skywalking-agent -- 提供全链路监控 agent
├── mesh-test -- 框架搭建时的相关测试代码
├── sql -- sql 执行语句
└── style -- 框架代码规范约定

服务端口规约

</table> ## 版本说明 #### 版本依赖关系 | 技术 | 说明 | 官网 | | ------------------ |-------------------|---------------------------------------------------------------------------------------| | Spring Cloud | 微服务架构框架 | [https://spring.io/projects/spring-cloud](https://spring.io/projects/spring-cloud) | | Spring Boot | SpringBoot 框架 | [https://spring.io/projects/spring-boot](https://spring.io/projects/spring-boot) | | Netflix Eureka | 服务注册与发现 | [https://github.com/Netflix/eureka](https://github.com/Netflix/eureka) | | Alibaba Nacos | 服务注册与发现 | [https://github.com/alibaba/nacos](https://github.com/alibaba/nacos) | | Nacos Config | 服务配置中心 | [https://github.com/alibaba/nacos](https://github.com/alibaba/nacos) | | Netflix Eureka | 服务注册与发现 | [https://github.com/Netflix/eureka](https://github.com/Netflix/eureka) | | Gateway | 服务网关 | [https://spring.io/projects/spring-cloud](https://spring.io/projects/spring-cloud) | | Zull | 服务网关 | [https://spring.io/projects/spring-cloud](https://spring.io/projects/spring-cloud) | | Spring Security | 认证和授权框架 | [https://spring.io/projects/spring-security](https://spring.io/projects/spring-security) | | Oauth2.0 | 认证授权协议规范 | [https://oauth.net/2](https://oauth.net/2) | | OpenFeign | 服务之间调用解决方案 | [https://github.com/OpenFeign/feign](https://github.com/OpenFeign/feign) | | Alibaba Sentinel | 流量控制、熔断降级 | [https://github.com/alibaba/Sentinel](https://github.com/alibaba/Sentinel) | | Alibaba Seata | 分布式事务框架 | [https://github.com/seata/seata](https://github.com/seata/seata) | | Apache Skywalking | 提供全链路监控 | [https://github.com/apache/skywalking](https://github.com/apache/skywalking) | | Jasypt | 安全加密和管理 | [https://github.com/ulisesbocchio/jasypt-spring-boot](https://github.com/ulisesbocchio/jasypt-spring-boot) | | MyBatis | ORM 框架 | [http://www.mybatis.org/mybatis-3/zh/index.html](http://www.mybatis.org/mybatis-3/zh/index.html) | | MyBatisPlus | ORM 增强工具 | [https://mp.baomidou.com/](https://mp.baomidou.com/) | | MyBatisGenerator | 数据层代码生成 | [http://www.mybatis.org/generator/index.html](http://www.mybatis.org/generator/index.html) | | PageHelper | MyBatis 物理分页插件 | [http://git.oschina.net/free/Mybatis_PageHelper](http://git.oschina.net/free/Mybatis_PageHelper) | | Swagger-UI | 文档生产工具 | [https://github.com/swagger-api/swagger-ui](https://github.com/swagger-api/swagger-ui) | | Redis | 分布式缓存 |[https://redis.io/](https://redis.io/) | | Druid | 数据库连接池 |[https://github.com/alibaba/druid](https://github.com/alibaba/druid) | | JWT | JWT 登录支持 | [https://github.com/auth0/java-jwt](https://github.com/auth0/java-jwt) | | logback | 日志收集 | [https://github.com/logstash/logstash-logback-encoder](https://github.com/logstash/logstash-logback-encoder) | | Lombok | 简化对象封装工具 | [https://github.com/rzwitserloot/lombok](https://github.com/rzwitserloot/lombok) | ## 架构图 ##### 系统架构图 ![系统架构图](https://cdn.willlu.cn/architectural-design.png) ##### 业务架构图 TDB ## 如何构建 * 项目采用 Spring Cloud Greenwich,最低支持 JDK 1.8。 * Maven:3.3.9+ * Mysql:5.7+ * Redis:3.2+ Spring Cloud 使用 Maven 来构建,最快的使用方式将本项目执行以下命令: ./mvnw clean install 执行完毕后,项目将被安装到本地 Maven 仓库。 ## 运行 启动各服务即可,访问各服务查看对应的配置文件,格式: spring.application.name:spring.port 参考文档 查看 [WIKI](https://github.com/romeoblog/spring-cloud/wiki) ## 联系方式 #### 邮箱: willluzheng@gmail.com willluzheng@163.com #### 微信: willlu_zheng ![个人微信](http://cdn.willlu.cn/%E5%BE%AE%E4%BF%A1%E4%B8%AA%E4%BA%BA%E5%90%8D%E7%89%87.jpeg) ## 许可证 [GNU Affero General Public License v3.0](https://github.com/romeoblog/spring-cloud/blob/master/LICENSE) Copyright © 2019-2020 郑伟陆
网关服务(8080-8099)
服务名称 服务端口号 Docker映射端口号
mesh-gateway 8080 8080
mesh-gateway-zuul 8090 8090
认证服务(8010-8019)
服务名称 服务端口号 Docker映射端口号
mesh-auth-server 8010 8010
监控服务(8020-8049)
服务名称 服务端口号 Docker映射端口号
mesh-boot-admin 8020 8020
mesh-turbine 8030 8030
apache skywalking 8040 8040
注册中心服务(8830-8860)
服务名称 服务端口号 Docker映射端口号
mesh-eureka 8830 8830
mesh-config(spring-cloud-config) 8850 8850
alibaba nacos 8848 8848
分布式事务服务(8091-8099)
服务名称 服务端口号 Docker映射端口号
alibaba seata 8091 8091
消息中间件MQ服务(8050-8079)
服务名称 服务端口号 Docker映射端口号
roketmq-name-server 9876 9876
roketmq-broker 10909、10911 10909、10911
mesh-rocketmq-producer 8050 8050
mesh-rocketmq-consumer 8060 8060
mesh-rocketmq-console 8070 8070
全文搜索引擎Elastisearch(8700-8709)
服务名称 服务端口号 Docker映射端口号
mesh-elastisearch 8700 8700
业务服务(8610-8699)
服务名称 服务端口号 Docker映射端口号
mesh-business-service 8610 8610
mesh-order-service 8620 8620
mesh-storage-service 8630 8630
mesh-user-service 8640 8640
mesh-mybatis-service 8650 8650
MongoDB(8710-8719)
服务名称 服务端口号 Docker映射端口号
mesh-mongoDB 8710 8710
任务调度器(8720-8729)
mesh-quartz 8720 8720
全量同步(8730-8739)
服务名称 服务端口号 Docker映射端口号
mesh-quartz 8730 8730
Cassandra(8740-8744)
服务名称 服务端口号 Docker映射端口号
mesh-quartz 8730 8730
Elestic-Job(8745-8746)
服务名称 服务端口号 Docker映射端口号
mesh-quartz 8745 8745
Staturn(8747-8748)
服务名称 服务端口号 Docker映射端口号
mesh-quartz 8747 8747