# zero **Repository Path**: aimh/zero ## Basic Information - **Project Name**: zero - **Description**: 基于Spring Cloud Alibaba 的微服务架构实践。集成了服务注册中心-Nacos,服务网关-Spring Cloud Gateway,服务监控-Spring Boot Admin, 服务链路监控-Zipkin,分布式系统的流量防卫兵-Sentinel,阿里云对象存储服务-Alibaba Cloud OSS。服务间调用对内RPC,对外REST。数据访问层采用Dubbo进行通信,业务逻辑层采用open feign进行通信。基于element-ui,实现前后端分离的应用。提供RBAC权限管理系统 。 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 8 - **Forks**: 3 - **Created**: 2020-04-26 - **Last Updated**: 2023-02-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ZERO 微服务架构实践 ## 概述 基于Spring Cloud Alibaba 的微服务架构实践。集成了服务注册中心-Nacos,服务网关-Spring Cloud Gateway,服务监控-Spring Boot Admin, 服务链路监控-Zipkin,分布式系统的流量防卫兵-Sentinel,阿里云对象存储服务-Alibaba Cloud OSS。服务间调用对内RPC,对外REST。数据访问层采用Dubbo进行通信,业务逻辑层采用open feign进行通信。基于element-ui,实现前后端分离的应用。提供RBAC权限管理系统 。 ## 模块说明 ``` zero ├── zero-business -- 业务逻辑层 ├── business-admin-feign -- admin服务feign接口 ├── business-admin-service -- admin服务[8868] ├── business-oauth2-feign -- OAuth2鉴权服务feign接口 └── business-oauth2-feign -- OAuth2鉴权服务[8898] ├── zero-cloud -- 阿里云服务 ├── cloud-upload-feign -- OSS上传服务feign接口 └── cloud-upload-service -- OSS上传服务[8828] └── zero-commons -- 系统公共模块 ├── commons-core -- 公共工具类核心包 ├── commons-dto -- 公共dto ├── commons-log -- 通用日志处理 ├── commons-security -- 安全工具类 └── commons-util -- 公共工具类 ├── zero-configuration -- 公共配置 ├── configuration-feign -- feign配置 └── configuration-sentinel -- sentinel配置 ├── zero-dependencies -- 依赖管理 ├── zero-gateway -- Spring Cloud Gateway网关[8888] ├── zero-monitor -- Spring Boot Admin监控 [8878] ├── zero-provider-- 数据访问层 ├── provider-admin-api -- admin数据访问接口 └── provider-admin-service -- admin数据访问服务提供者 ├── zero-register -- Nacos Server[8848] ├── zero-ui -- zero-admin前端ui └── zipkin-server -- zipkin链路监控 ``` ## 开发工具 工具 | 地址 ----|---- Intellij IDEA | https://www.jetbrains.com/idea/download SwitchHosts | https://oldj.github.io/SwitchHosts/ FinalShell | http://www.hostbuf.com/ Postman | https://www.getpostman.com/downloads/ ## 商业组件 服务 | 说明 | 地址 ----|----|---- Aliyun SDK OSS | 阿里云对象存储服务 | [官网](https://help.aliyun.com/product/31815.html?spm=a2c4g.750001.list.19.3cce7b13L4uLgg) ## 后端技术 技术 | 说明 | 地址 ----|----|---- Spring Boot | 新一代 JavaEE 开发标准 | [GitHub](https://github.com/spring-projects/spring-boot) Spring Cloud Alibaba | 阿里巴巴基于 Spring Cloud 编程模型的微服务生态 | [GitHub](https://github.com/alibaba/spring-cloud-alibaba) Spring Cloud Alibaba Dubbo | 与 Spring Cloud Alibaba 生态相结合的高性能 Java RPC 框架 | [GitHub](https://github.com/apache/dubbo) Spring Cloud Alibaba RocketMQ | 分布式消息系统 | [GitHub](https://github.com/alibaba/spring-cloud-alibaba/blob/master/spring-cloud-alibaba-examples/rocketmq-example/readme.md) Spring Security oAuth2 | 安全认证和授权框架 | [GitHub](https://github.com/spring-projects/spring-security-oauth) Spring Social | 第三方登录接入框架 | [GitHub](https://github.com/spring-projects/spring-social) MyBatis Plus | 基于 MyBatis 二次开发的轻量级框架,用于简化 MyBatis 操作 | [官网](https://mp.baomidou.com/) MyBatisGenerator | Maven 插件,用于 MyBatis 相关代码生成 | [官网](http://www.mybatis.org/generator/) MybatisCodeHelper | Intellij IDEA 插件,用于 MyBatis 相关代码生成 | [官网](https://plugins.jetbrains.com/plugin/9837-mybatiscodehelperpro) PageHelper | MyBatis 分页插件 | [GitHub](https://github.com/pagehelper/Mybatis-PageHelper) Swagger | API 文档生成工具 | [GitHub](https://github.com/swagger-api/swagger-ui) HikariCP | 数据库连接池 | [GitHub](https://github.com/brettwooldridge/HikariCP) Docker | 容器化引擎 | [官网](https://www.docker.com/) Docker Compose | 容器编排工具 | [官网](https://docs.docker.com/compose/) Kubernetes | 容器编排系统 | [官网](https://kubernetes.io/) TiDB | 分布式数据库 | [官网](https://pingcap.com/) OKHttp3 | 轻量级网络框架 | [GitHub](https://github.com/square/okhttp) OpenFeign | 声明式 HTTP 客户端 | [GitHub](https://github.com/OpenFeign/feign) UserAgentUtils | 用户代理检查工具 | [GitHub](https://github.com/HaraldWalker/user-agent-utils) ## 前端技术 技术 | 说明 | 地址 ----|----|---- Vue | 前端框架,MVVM 模式的实现者 | [GitHub](https://github.com/vuejs/vue) Vue CLI | Vue 脚手架,基于 NodeJS | [GitHub](https://github.com/vuejs/vue-cli) Vue Router | Vue 路由框架 | [GitHub](https://github.com/vuejs/vue-router) Vuex | Vue 全局状态管理框架 | [GitHub](https://github.com/vuejs/vuex) Axios | 前端 HTTP 框架 | [GitHub](https://github.com/axios/axios) Element UI | 饿了么 UI 框架 | [官网](https://element.eleme.cn) Vue Element Admin | 基于 Element UI 的前端后台解决方案 | [GitHub](https://github.com/PanJiaChen/vue-element-admin) Vue Image Crop Upload | Vue 图片剪裁上传组件 | [GitHub](https://github.com/dai-siki/vue-image-crop-upload) ## 框架集成 集成 | 完成 ----|---- Spring Boot | ✔ Spring Cloud Alibaba | ✔ Spring Cloud Alibaba Dubbo | ✔ Spring Cloud Alibaba Sentinel | ✔ Spring Security oAuth2 | ✔ MyBatis Plus| ✔ HikariCP | ✔ OKHttp3 | ✔ Feign 传递 Token | ✔ ## 后台功能清单 ### 认证授权 功能 | 完成 ----|---- 用户注册 | ✔ 用户登录 | ✔ 获取 Token | ✔ ### 个人信息 功能 | 完成 ----|---- 查看信息 | ✔ 更新信息 | ✔ 更新密码 | ✔ 更新头像 | ✔ ### 权限管理 角色 | 菜单 ----|---- 超级管理员 | 所有菜单权限 运营人员 | 首页、用户、促销、运营、内容 功能 | 说明 | 完成 ----|----|---- 权限管理 | 添加权限、删除权限、修改权限、以树形结构返回权限 | 角色管理 | 添加角色、删除角色、更新角色、角色列表、获取角色权限、修改角色权限 | 成员管理 | CRUD、为成员分配角色、获取成员角色、权限分配、获取权限列表 | # ZERO-UI ## 前端模板 初始模板基于: [https://github.com/PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) 模板文档: [https://panjiachen.github.io/vue-element-admin-site/zh/guide/](https://panjiachen.github.io/vue-element-admin-site/zh/guide/) ## Build Setup ``` bash # 安装依赖 npm install # 启动服务 localhost:8080 npm run dev # 构建生产环境 npm run build ```