# elsfs-cloud
**Repository Path**: jglab/elsfs-cloud
## Basic Information
- **Project Name**: elsfs-cloud
- **Description**: Enterprise level safety function system 企业级安全功能系统
基于 Spring Cloud 2023、Spring Boot 3.2、Spring cloud alibaba 2022
spring-oauth2-authorization-server 的 RBAC 权限管理系
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: https://doc.jglab.org.cn
- **GVP Project**: No
## Statistics
- **Stars**: 118
- **Forks**: 8
- **Created**: 2023-11-03
- **Last Updated**: 2026-04-19
## Categories & Tags
**Categories**: authority-management
**Tags**: None
## README
欢迎使用elsfs-cloud
Elsfs Cloud 1.1.0
Enterprise level safety function system
企业级安全功能系统
## 系统说明
- 基于 Spring Cloud 2023、Spring Boot 3.2、Spring cloud alibaba 2022
- spring-oauth2-authorization-server 的 RBAC 权限管理系统
- 基于数据驱动视图的理念封装 ant-design,即使没有 vue 的使用经验也能快速上手
- 提供对常见容器化支持 Docker、Kubernetes、Rancher2 支持(待实现)
### 使用文档
Elsfs Cloud 提供了详尽的部署文档 👉 [https://doc.jglab.org.cn](https://doc.jglab.org.cn),涵盖开发环境配置、服务端启动、前端运行等关键步骤。
重要的事情说三遍:
* 🔥[配套文档 https://doc.jglab.org.cn](https://doc.jglab.org.cn)
* 🔥[配套文档 https://doc.jglab.org.cn](https://doc.jglab.org.cn)
* 🔥[配套文档 https://doc.jglab.org.cn](https://doc.jglab.org.cn)
## 快速开始
快速体验
```shell
# 可用内存大于4G
# 1. clone仓库
git clone https://github.com/elsfs/elsfs-cloud.git
cd elsfs-cloud
# 2. 导入sql 到数据库
mysql -uroot -p < doc/db/mysql/*.sql
# 3. 修改配置文件数据库用户名密码 webapps/system-application/src/main/resources/config/application.yml
# 4. 构建
./gradlew clean build
# 5. 启动
java -jar webapps/system-application/build/libs/system-application-1.1.0.jar
```
### 核心依赖
| 依赖 | 版本 |
|-----------------------------|------------|
| Spring Cloud | 2025.0.x |
| Spring Cloud Alibaba | 2025.0.0.x |
| Spring Authorization Server | 1.4.x |
| Mybatis Plus | 3.5.14 |
| Spring Boot | 3.5.x |
## 模块说明
```lua
elsfs-cloud
├─── api -- api接口相关
├── api-security -- 安全api
├── api-validation -- 验证api
└── common -- 系统公共基础模块
├── annotations -- 通用注解
├── core -- 系统公共核心
├── excel -- excel导入导出配置
├── mybatis -- mybatis配置
├── pay -- 支付配置
├── redis -- redis配置
├── security -- 认证授权通用模块
├── sms -- 短信通用配置定义
├── swagger -- swagger配置
├── utils -- 工具类
├── validation -- validation验证相关
├── webs -- web公共配置
└── demo-webapps web示例
└── mq -- mq示例
└── security -- 认证授权示例
└── doc
├── db -- 数据库脚本
├── virtualization -- 虚拟化相关
├── framework-platform 框架依赖信息 相当于maven的pom.xml
└── gradle -- 框架相关
├── pmd -- pmd 规则
├── gstyle -- 代码规范
├── templates -- 生成模块模板
├── libs -- 外部包相关
└── module -- 业务相关
├── ai -- ai 实现相关
├── cms -- cms 实现相关
├── config -- config 实现相关
├── datasource -- datasource 实现相关
├── dict -- dict 实现相关
├── oss -- oss 实现相关
├── permission -- permission 实现相关
├── system -- system 实现相关
├── tenant -- tenant 实现相关
└── starter -- spring starter
├── authorizationserver-server-boot-starter -- oauth2 授权服务器启动
├── elsfs-screw-spring-starter -- screw 启动
├── excel-spring-boot-starter -- excel 启动
├── login-spring-boot-starter -- login 启动
└── webapps -- 启动类
├── auth-application -- 认证授权服务
├── front-application -- 前端服务
├── monitor-application -- 监控服务
├── nacos-dashboard -- nacos dashboard
├── sentinel-dashboard -- sentinel 启动
├── system-application -- 系统服务
```
#### 使用说明
1. clone 项目
| 平台 | 地址 |
|-------------|-----------------------------------------|
| gitee | https://gitee.com/jglab/elsfs-cloud |
| github | https://github.com/elsfs/elsfs-cloud |
| 文档贡献 | https://gitee.com/jglab/elsfs-cloud-doc |
| 文档地址 | https://doc.jglab.org.cn |
| 前端代码(gitee) | https://gitee.com/jglab/elsfs-admin |
2. 构建项目
```shell
cd elsfs-cloud
# 代码检查
./gradlew checkstyleMain -P check
# 代码格式化
./gradlew spotlessApply -P check
# 构建代码
./gradlew clean
./gradlew build -P dev
```
#### 业务依赖层次
依赖约定
1. 一级为基础层,二级为基础业务层,三级为业务层
2. 平级可以相互依赖,但是不能循环依赖,标注依赖不能逆依赖
3. system模块不能被同级依赖
4. 下级可以依赖上级
5. 上级不能依赖下级
6. 同级之间只能依赖api子模块
7. 业务层必须包含api子模块 ,biz子模块和sys子模块可选,如果有其他特殊业务需要定义模块的,子模块可以自定义(通车是业务的首字母或者有明确的业务单纯)
```mermaid
graph TB
subgraph L1 [L1 基础隔离层 Tenant&DataSource Layer]
tenant[tenant
租户]
datasource[datasource
数据源]
end
subgraph L2 [L2 基础业务层 Base Business Layer]
dict[dict
字典/主数据]
config[config
配置]
oss[oss
文件存储]
pay[pay
支付]
end
subgraph L3[L3 应用模块层 Application Modules]
permission[permission
权限管理]
system[system
系统管理]
cms[cms
内容管理]
school_classes[school_classes
班级管理]
end
%% 连接关系
tenant --> datasource
datasource --> dict
datasource --> config
datasource --> oss
datasource --> pay
dict --> cms
oss --> cms
oss --> school_classes
dict --> school_classes
dict --> system
config --> system
oss --> system
pay --> system
permission --> system
dict --> permission
config --> permission
cms --> system
school_classes --> system
%% 样式定义
classDef appLayer fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef baseLayer fill:#e8f5e8,stroke:#43a047,stroke-width:2.5px
classDef infraLayer fill:#e1f5fe,stroke:#0288d1,stroke-width:3px
%% 应用样式
class permission,system,cms,classes,school_classes appLayer
class oss,dict,pay,config baseLayer
class tenant,datasource infraLayer
style L1 fill:none,stroke:#0288d1,stroke-width:2px,stroke-dasharray:10
style L2 fill:none,stroke:#43a047,stroke-width:2px,stroke-dasharray:10
style L3 fill:none,stroke:#7b1fa2,stroke-width:2px,stroke-dasharray:10
```
标注依赖
```mermaid
graph LR
permission--> system
```
#### 参与贡献
1. 欢迎提交 [PR](https://gitee.com/jglab/elsfs-cloud/pulls),
代码规范 [google-java-javaformat](https://github.com/google/google-java-javaformat)
代码规范说明
1. 由于 google-java-format
强制所有代码按照指定格式排版,未按此要求提交的代码将不能通过合并(打包)
2. 具体配置参考csdn 使用谷歌 Java 开发规范
3. 其他开发工具,请参考
google-java-format
说明,或`提交代码前`在项目根目录运行下列命令(需要开发者电脑支持`mvn`命令)进行代码格式化
```shell
# 代码检查
./gradlew checkstyleMain -P check
# 代码格式化
./gradlew spotlessApply -P check
```
2. 欢迎提交 [issue](https://gitee.com/jglab/elsfs-cloud/issues),请写清楚遇到问题的原因、开发环境、复显步骤。
3. 联系作者 mailto:maicaii@vip.qq.com