README.md 6.3 KB
Newer Older
1

H
haoxr 已提交
2 3
<p align="center">
    <img alt="有来技术" src="https://img.shields.io/badge/Java -17-brightgreen.svg"/>
H
haoxr 已提交
4
    <img alt="有来技术" src="https://img.shields.io/badge/SpringBoot-3.2.3-green.svg"/>
H
haoxr 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18
     <a href="https://gitee.com/youlaitech/youlai-boot" target="_blank">
        <img alt="有来技术" src="https://gitee.com/youlaiorg/youlai-boot/badge/star.svg"/>
    </a>     
    <a href="https://github.com/haoxianrui" target="_blank">
        <img alt="有来技术" src="https://img.shields.io/github/stars/haoxianrui/youlai-boot.svg?style=social&label=Stars"/>
    </a>
    <br/>
    <img alt="有来技术" src="https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg"/>
    <a href="https://gitee.com/youlaiorg" target="_blank">
        <img alt="有来技术" src="https://img.shields.io/badge/Author-有来开源组织-orange.svg"/>
    </a>
</p>

<p align="center">
H
haoxr 已提交
19 20 21 22
   <a target="_blank" style="color: greenyellow" href="https://vue3.youlai.tech/">👀 在线预览</a> |
   <a target="_blank" href="https://youlai.blog.csdn.net">📖 官方博客</a> |
   <a target="_blank" href="https://gitee.com/haoxr">🦄 Gitee</a> |
   <a target="_blank" href="https://github.com/haoxianrui">🚢 Github</a> 
H
haoxr 已提交
23
</p>
24

H
haoxr 已提交
25
## 📢 项目简介
26

H
haoxr 已提交
27
**在线预览**: [https://vue3.youlai.tech](https://vue3.youlai.tech)
28

H
haoxr 已提交
29
基于 JDK 17、Spring Boot 3、Spring Security 6、JWT、Redis、Mybatis-Plus、Knife4j、Vue 3、Element-Plus 构建的前后端分离单体权限管理系统。
H
horizons 已提交
30

H
hxr 已提交
31
- **🚀 开发框架**: 使用 Spring Boot 3 和 Vue 3,以及 Element-Plus 等主流技术栈,实时更新。
H
horizons 已提交
32

H
haoxr 已提交
33 34 35 36 37 38 39 40 41
- **🔐 安全认证**: 结合 Spring Security 和 JWT 提供安全、无状态、分布式友好的身份验证和授权机制。

- **🔑 权限管理**: 基于 RBAC 模型,实现细粒度的权限控制,涵盖接口方法和按钮级别。

- **🛠️ 功能模块**: 包括用户管理、角色管理、菜单管理、部门管理、字典管理等多个功能。

- **📘 接口文档**: 自动生成接口文档,支持在线调试,提高开发效率。

## 📁 项目目录
H
haoxr 已提交
42 43 44 45 46 47 48 49 50
```
youlai-boot
├── sql                                 # SQL脚本
    ├── mysql5                          # MySQL5 脚本
    ├── mysql8                          # MySQL8 脚本
├── src                                 # 源码目录
    ├── common                          # 公共模块
    ├── config                          # 自动装配配置
        ├── CorsConfig                  # 跨域共享配置
51 52 53 54
        ├── MybatisConfig               # Mybatis 自动装配配置
        ├── RedisCacheConfig            # Redis 缓存自动装配配置
        ├── RedisConfig                 # Redis 自动装配配置
        ├── SecurityConfig              # Spring Security 自动装配配置
H
haoxr 已提交
55 56
        ├── SwaggerConfig               # API 接口文档配置
        ├── WebMvcConfig                # WebMvc 配置
57 58
        ├── WebSocketConfig             # WebSocket 自动装配配置
        ├── XxlJobConfig                # XXL-JOB 自动装配配置
H
haoxr 已提交
59
    ├── controller                      # 控制层
H
hxr 已提交
60
    ├── converter                       # MapStruct 转换器
H
haoxr 已提交
61 62 63 64 65 66 67 68 69 70 71 72
    ├── filter                          # 过滤器
        ├── RequestLogFilter            # 请求日志过滤器
        ├── VerifyCodeFilter            # 验证码过滤器
    ├── model                           # 模型层
        ├── bo                          # 业务对象
        ├── dto                         # 数据传输对象
        ├── entity                      # 实体对象
        ├── form                        # 表单对象
        ├── query                       # 查询参数对象
        ├── vo                          # 视图对象
    ├── mapper                          # 数据库访问层
    ├── plugin                          # 插件(可选)
73
        ├── captcha                     # 验证码插件,用于生成验证码
H
haoxr 已提交
74
        ├── dupsubmit                   # 防重提交插件,用于防止表单重复提交
H
hxr 已提交
75
        ├── mybatis                     # Mybatis 插件,数据权限、字段填充
H
haoxr 已提交
76 77
        ├── easyexcel                   # EasyExcel 插件,Excel 文件的读写
        ├── xxljob                      # XXL-JOB 插件,分布式任务调度和执行
H
hxr 已提交
78 79 80 81
    ├── security                        # Spring Security 安全配置和扩展
        ├── util                        # 工具类
            ├── JwtUtils                # JWT 工具类,用于生成和解析 JWT
            ├── SecurityUtils           # Spring Security 工具类,用于获取当前登录用户
H
haoxr 已提交
82
    ├── service                         # 业务逻辑层
H
hxr 已提交
83

84
    
H
haoxr 已提交
85 86 87
└── end       
```

H
haoxr 已提交
88 89 90 91
## 🌺 前端工程
| Gitee | Github |
|-------|------|
| [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin)  | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin)  |
H
haoxr 已提交
92 93


H
haoxr 已提交
94
## 🌈 接口文档
H
haoxr 已提交
95 96 97

- `knife4j` 接口文档:[http://localhost:8989/doc.html](http://localhost:8989/doc.html)
- `swagger` 接口文档:[http://localhost:8989/swagger-ui/index.html](http://localhost:8989/swagger-ui/index.html)
H
haoxr 已提交
98
- `apifox`  在线接口文档:[https://www.apifox.cn/apidoc](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5)
H
haoxr 已提交
99

H
horizons 已提交
100

H
haoxr 已提交
101
## 🚀 项目启动
H
horizons 已提交
102

H
haoxr 已提交
103
1. **数据库初始化**
H
horizons 已提交
104

H
haoxr 已提交
105
    执行 [youlai_boot.sql](sql/mysql8/youlai_boot.sql) 脚本完成数据库创建、表结构和基础数据的初始化。
H
haoxr 已提交
106

H
haoxr 已提交
107
2. **修改配置**
H
horizons 已提交
108

H
haoxr 已提交
109
    [application-dev.yml](src/main/resources/application-dev.yml) 修改MySQL、Redis连接配置;
H
horizons 已提交
110

H
haoxr 已提交
111
3. **启动项目**
H
haoxr 已提交
112

H
haoxr 已提交
113
    执行 [SystemApplication.java](src/main/java/com/youlai/system/SystemApplication.java) 的 main 方法完成后端项目启动;
H
horizons 已提交
114

H
haoxr 已提交
115
    访问接口文档地址 [http://ip:port/doc.html](http://localhost:8989/doc.html) 验证项目启动是否成功。
H
horizons 已提交
116 117


H
haoxr 已提交
118
## 💖 加交流群
H
horizons 已提交
119

H
haoxr 已提交
120
> 关注公众号【有来技术】,获取交流群二维码,不想关注公众号或二维码过期欢迎加我微信(`haoxianrui`)备注【有来】即可,拉你进群。
H
horizons 已提交
121

H
haoxr 已提交
122 123
| ![](https://s2.loli.net/2022/11/19/OGjum9wr8f6idLX.png) |
|---------------------------------------------------------|
H
horizons 已提交
124 125