# Lay-Vue-Super **Repository Path**: gtnotgod/lay-vue-super ## Basic Information - **Project Name**: Lay-Vue-Super - **Description**: 基于LayUi-Vue-Admin+Springboot的后台管理系统(前后端),开箱即用 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2024-11-27 - **Last Updated**: 2025-11-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Lay-Vue-Super > 基于 Layui Vue Admin + Spring Boot 3.x 的企业级前后端分离管理系统 ## 📋 项目简介 **Lay-Vue-Super** 是一个现代化的企业级管理系统框架,采用前后端分离架构,基于 Spring Boot 3.x 和 Vue 3 技术栈开发。项目提供完整的权限管理、系统监控、文件管理等核心功能,开箱即用。 ### ✨ 核心特性 - 🚀 **现代化技术栈**: Spring Boot 3.3.10 + JDK 21 + Vue 3.3.4 - 🔐 **完整权限体系**: 基于 Sa-Token 的认证授权系统 - 📊 **丰富功能模块**: 用户管理、角色管理、字典管理、组织管理、AI问答、操作日志管理、登录日志管理、菜单管理、文件管理、API管理等 - 📱 **响应式设计**: 基于 Layui Vue 的现代化 UI 组件 - 📖 **完善文档**: 集成 Knife4j 接口文档,支持在线调试 - 🛠️ **代码生成**: 支持 EasyCode 插件快速生成 CRUD 代码 ![img_1.png](image%2Fimg_1.png) ![img_10.png](image%2Fimg_10.png) ![img.png](image/img.png) ![img_2.png](image%2Fimg_2.png) ![img_3.png](image%2Fimg_3.png) ![img_4.png](image%2Fimg_4.png) ![img_5.png](image%2Fimg_5.png) ![img_6.png](image%2Fimg_6.png) ![img_7.png](image%2Fimg_7.png) ![img_8.png](image%2Fimg_8.png) ![img_9.png](image%2Fimg_9.png) ## 🏗️ 技术架构 ### 后端技术栈 - **核心框架**: Spring Boot 3.3.10 - **JDK版本**: 21 - **数据库**: MySQL 8.4.0 - **ORM框架**: MyBatis Plus 3.5.14 - **认证授权**: Sa-Token 1.39.0 - **缓存系统**: Redis + Caffeine - **API文档**: Knife4j (Swagger3) - **Web服务器**: Undertow - **构建工具**: Maven ### 前端技术栈 - **核心框架**: Vue 3.3.4 - **UI组件**: Layui Vue 2.21.1 - **构建工具**: Vite 4.3.5 - **包管理**: pnpm 8.14.0 - **路由管理**: Vue Router 4.2.5 - **状态管理**: Pinia 2.1.7 - **HTTP客户端**: Axios 1.5.1 ## 🚀 快速开始 ### 环境要求 - **JDK**: 21+ - **Node.js**: 16.0.0+ - **MySQL**: 8.0+ - **Redis**: 6.0+ - **Maven**: 3.6+ ### 后端部署 1. **数据库初始化** ```sql -- 导入数据库脚本 -- 脚本位置: project-web-server/src/main/initsql/test_admin_123.sql ``` 2. **配置修改** - 修改 `project-web-server/src/main/resources/application-dev.yml` 中的数据库连接信息 - 修改 Redis 连接配置 - 调整文件存储路径 3. **启动后端服务** ```bash # 方式一: IDE直接运行 # 启动类: com.gt.quality.WebApplication # 方式二: Maven打包运行 mvn clean install cd project-web-server/target java -jar layui-manage-system-1.0.0-SNAPSHOT.jar ``` 4. **访问接口文档** - Knife4j文档: http://localhost:8090/qa/doc.html - Swagger UI: http://localhost:8090/qa/swagger-ui.html ### 前端部署 1. **环境准备** ```bash # 安装Node.js 16.0.0+ nvm install 16.0.0 nvm use 16.0.0 # 安装pnpm npm install -g pnpm@7.3.0 ``` 2. **安装依赖** ```bash cd web-Front pnpm install ``` 3. **启动开发服务器** ```bash npm run dev # 访问: http://localhost:5173 ``` 4. **生产构建** ```bash npm run build:prod ``` ## 🔑 默认账号 - **用户名**: admin - **密码**: admin ## 📊 功能模块 ### 系统管理 - **用户管理**: 用户增删改查、角色分配、状态管理 - **角色管理**: 角色权限配置、菜单分配 - **菜单管理**: 动态菜单配置、权限控制 - **部门管理**: 组织架构管理 - **字典管理**: 系统字典数据管理 ### 文件管理 - **文件上传下载**: 支持多种文件类型 - **文件预览**: 在线预览功能 - **文件管理**: 文件列表、删除、批量操作 ### 日志管理 - **操作日志**: 用户操作记录追踪 - **登录日志**: 用户登录历史记录 ### API管理 - **API接口管理**: 接口注册、参数配置 - **Mock服务**: 接口模拟测试 ## 📁 项目结构 ``` layVueSuper/ ├── project-web-server/ # 后端Spring Boot项目 │ ├── src/main/java/ │ │ └── com/gt/quality/ │ │ ├── WebApplication.java # 启动类 │ │ ├── config/ # 配置类 │ │ ├── controller/ # 控制器层 │ │ ├── system/ # 系统模块 │ │ │ ├── controller/ # 系统控制器 │ │ │ ├── entity/ # 实体类 │ │ │ ├── mapper/ # 数据访问层 │ │ │ └── login/ # 登录相关 │ │ ├── apim/ # API管理模块 │ │ ├── base/ # 基础类 │ │ └── utils/ # 工具类 │ └── src/main/resources/ │ ├── application.yml # 主配置文件 │ ├── application-dev.yml # 开发环境配置 │ └── log4j2.xml # 日志配置 ├── web-Front/ # 前端Vue项目 │ ├── src/ │ │ ├── views/ # 页面组件 │ │ │ ├── system/ # 系统管理页面 │ │ │ │ ├── user/ # 用户管理 │ │ │ │ ├── file/ # 文件管理 │ │ │ │ ├── role/ # 角色管理 │ │ │ │ └── menu/ # 菜单管理 │ │ │ ├── form/ # 表单页面 │ │ │ ├── table/ # 表格页面 │ │ │ └── workSpace/ # 工作空间 │ │ ├── api/ # API接口 │ │ ├── store/ # 状态管理 │ │ ├── router/ # 路由配置 │ │ └── layouts/ # 布局组件 │ ├── package.json # 前端依赖配置 │ └── vite.config.ts # Vite配置 └── pom.xml # Maven父项目配置 ``` ## 🔧 核心配置 ### 后端配置 (application-dev.yml) ```yaml spring: datasource: username: guotong password: 123456 url: jdbc:mysql://localhost:3306/test_admin_123?useUnicode=true&characterEncoding=utf8 driver-class-name: com.mysql.cj.jdbc.Driver data: redis: host: 127.0.0.1 port: 6379 password: 123456 database: 1 server: port: 8090 servlet: context-path: /qa ``` ### 前端配置 (src/api/http.ts) ```typescript const http = axios.create({ baseURL: 'http://localhost:8090/qa', timeout: 10000, headers: { 'Content-Type': 'application/json', } }) ``` ## 🐛 常见问题 ### 后端启动问题 - **端口被占用**: 修改 `application.yml` 中的 `server.port` - **数据库连接失败**: 检查 `application-dev.yml` 中的数据库配置 ### 前端启动问题 - **Node.js版本不兼容**: 使用 nvm 切换至 Node.js 16.0.0 - **依赖安装失败**: 使用 pnpm 替代 npm 安装依赖 ### 接口调用问题 - **跨域问题**: 后端已配置CORS,检查前端API地址配置 - **认证失败**: 确保请求头携带正确的 token ## 🤝 参与贡献 1. Fork 本仓库 2. 新建功能分支 (`git checkout -b feature/AmazingFeature`) 3. 提交更改 (`git commit -m 'Add some AmazingFeature'`) 4. 推送到分支 (`git push origin feature/AmazingFeature`) 5. 开启 Pull Request ## 📄 许可证 本项目采用开源许可证,具体请查看 LICENSE 文件。 ## 🔗 相关链接 - [Layui Vue 官网](http://www.layui-vue.com/) - [Spring Boot 官方文档](https://spring.io/projects/spring-boot) - [Vue 3 官方文档](https://v3.vuejs.org/) - [MyBatis Plus 文档](https://baomidou.com/) --- **如有问题,请参考项目中的详细配置文件和接口文档。**