refactor: 目录结构调整和代码优化

This commit is contained in:
ray
2024-08-31 14:59:40 +08:00
parent f9e9dbcedd
commit 5a3694f2af
112 changed files with 644 additions and 572 deletions

View File

@@ -43,47 +43,62 @@
```
youlai-boot
├── sql # SQL脚本
├── mysql5 # MySQL5 脚本
── mysql8 # MySQL8 脚本
├── mysql5 # MySQL5 脚本
── mysql8 # MySQL8 脚本
├── src # 源码目录
├── common # 公共模块
├── config # 自动装配配置
├── CorsConfig # 跨域共享配置
├── MybatisConfig # Mybatis 自动装配配置
├── RedisCacheConfig # Redis 缓存自动装配配置
├── RedisConfig # Redis 自动装配配置
├── SecurityConfig # Spring Security 自动装配配置
├── SwaggerConfig # API 接口文档配置
── WebMvcConfig # WebMvc 配置
├── WebSocketConfig # WebSocket 自动装配配置
├── XxlJobConfig # XXL-JOB 自动装配配置
├── controller # 控制层
├── converter # MapStruct 转换器
├── filter # 过滤器
├── RequestLogFilter # 请求日志过滤器
├── VerifyCodeFilter # 验证码过滤器
├── model # 模型层
├── bo # 业务对象
── dto # 数据传输对象
├── entity # 实体对象
├── form # 表单对象
├── query # 查询参数对象
── vo # 视图对象
├── mapper # 数据库访问层
├── plugin # 插件(可选)
── captcha # 验证码插件,用于生成验证码
├── dupsubmit # 防重提交插件,用于防止表单重复提交
├── mybatis # Mybatis 插件,数据权限、字段填充
── easyexcel # EasyExcel 插件Excel 文件的读写
── xxljob # XXL-JOB 插件,分布式任务调度和执行
├── security # Spring Security 安全配置和扩展
├── util # 工具类
├── JwtUtils # JWT 工具类,用于生成和解析 JWT
├── SecurityUtils # Spring Security 工具类,用于获取当前登录用户
├── service # 业务逻辑层
└── end
├── common # 公共模块
│ │ ├── annotation # 注解定义
├── base # 基础类
├── constant # 常量
├── enums # 枚举类型
├── exception # 异常处理
├── model # 数据模型
├── result # 结果封装
── util # 工具类
├── config # 自动装配配置
├── CorsConfig # 跨域共享配置
│ │ ├── MybatisConfig # Mybatis 自动装配配置
│ │ ├── RedisCacheConfig # Redis 缓存自动装配配置
│ │ ├── RedisConfig # Redis 自动装配配置
├── SecurityConfig # Spring Security 自动装配配置
├── SwaggerConfig # API 接口文档配置
│ │ ├── WebMvcConfig # WebMvc 配置
├── WebSocketConfig # WebSocket 自动装配配置
── XxlJobConfig # XXL-JOB 自动装配配置
├── core # 核心功能模块
├── aspect # 切面
├── LogAspect # 日志切面
── RepeatSubmitAspect # 防重提交切面
│ │ ├── filter # 过滤器
│ │ ├── RateLimiterFilter # 限流过滤器
── RequestLogFilter # 请求日志过滤器
├── handler # 处理器
├── MyDataPermissionHandler # 数据权限处理器
── MyMetaObjectHandler # 元对象字段填充处理器
── security # Security 安全中心
├── platform # 平台基础设施模块
├── auth # 授权
├── file # 文件处理
├── generator # 代码生成器
│ │ ├── mail # 邮件处理
│ │ └── sms # 短信处理
│ ├── system # 系统模块
│ │ ├── controller # 控制层
│ │ ├── converter # MapStruct 转换器
│ │ ├── event # 事件处理
│ │ ├── handler # 处理器
│ │ ├── listener # 监听器
│ │ ├── model # 模型层
│ │ │ ├── bo # 业务对象
│ │ │ ├── dto # 数据传输对象
│ │ │ ├── entity # 实体对象
│ │ │ ├── form # 表单对象
│ │ │ ├── query # 查询参数对象
│ │ │ └── vo # 视图对象
│ │ ├── mapper # 数据库访问层
│ │ └── service # 业务逻辑层
│ └── YouLaiApplication # 启动类
└── end
```
## 🌺 前端工程
@@ -111,7 +126,7 @@ youlai-boot
3. **启动项目**
执行 [SystemApplication.java](src/main/java/com/youlai/system/SystemApplication.java) 的 main 方法完成后端项目启动;
执行 [SystemApplication.java](src/main/java/com/youlai/boot/YouLaiApplication.java) 的 main 方法完成后端项目启动;
访问接口文档地址 [http://localhost:8989/doc.html](http://localhost:8989/doc.html) 验证项目启动是否成功。