# springboot-layuimini **Repository Path**: aicmc/springboot-layuimini ## Basic Information - **Project Name**: springboot-layuimini - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-05-03 - **Last Updated**: 2025-05-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # SpringBoot 框架项目 这是一个基于 SpringBoot 2.7.9 的框架项目,集成了常用的组件和工具。 ## 项目特点 - 基于 SpringBoot 2.7.9 - 集成 MyBatis-Plus 3.5.3 持久层框架 - 集成 Redis 缓存 - 使用 Druid 数据库连接池 - 集成 Lombok 简化开发 - 集成 Hutool 工具类库 - 集成 Swagger 3 (SpringDoc OpenAPI) 接口文档 - 统一的接口返回格式和全局异常处理 ## 项目结构 ``` boot-framework ├── src/main/java │ └── com.example.bootframework │ ├── common // 通用组件 │ │ ├── BusinessException // 业务异常类 │ │ ├── GlobalExceptionHandler // 全局异常处理器 │ │ └── Result // 统一响应结果 │ ├── config // 配置类 │ │ ├── MybatisPlusConfig // MyBatis-Plus配置 │ │ ├── RedisConfig // Redis配置 │ │ ├── SwaggerConfig // Swagger配置 │ │ └── WebConfig // Web配置 │ ├── controller // 控制器 │ ├── entity // 实体类 │ ├── mapper // 数据访问层 │ ├── service // 业务层 │ │ └── impl // 业务实现层 │ ├── util // 工具类 │ │ └── RedisUtil // Redis工具类 │ └── BootFrameworkApplication.java // 启动类 ├── src/main/resources │ ├── mapper // Mapper XML文件 │ └── application.yml // 应用配置文件 └── pom.xml // 项目依赖 ``` ## 快速开始 ### 环境要求 - JDK 1.8+ - Maven 3.0+ - MySQL 5.7+ - Redis 5.0+ ### 运行步骤 1. 克隆项目到本地 2. 在 MySQL 中创建数据库 `boot_framework` 3. 修改 `application.yml` 中的数据库连接信息和 Redis 连接信息 4. 运行项目 ```bash mvn spring-boot:run ``` 5. 访问测试接口:http://localhost:8080/api/hello 6. 访问Swagger接口文档:http://localhost:8080/api/swagger-ui.html ## 主要依赖 - Spring Boot 2.7.9 - MyBatis-Plus 3.5.3 - Druid 1.2.16 - Redis - Hutool 5.8.15 - Lombok - MySQL Connector 8.0.32 - SpringDoc OpenAPI (Swagger) 1.6.14 ## 功能特性 1. 统一的接口返回格式 2. 全局异常处理 3. Redis 工具类封装 4. MyBatis-Plus 配置和增强 5. 跨域配置 6. 业务异常处理 7. API文档自动生成 (Swagger)