# mx-spring-modules **Repository Path**: xjpVips/mx-spring-modules ## Basic Information - **Project Name**: mx-spring-modules - **Description**: springboot开发包 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-10-11 - **Last Updated**: 2026-07-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # mx-spring-modules 基于 Spring Boot 3.2.x / Java 21 的企业级快速开发模块库。 ## 模块列表 | 模块 | 说明 | |-------------------------------------------------------|-----------------------------------------------| | **[mx-spring-dev](mx-spring-dev/)** | 💎 核心基础:统一响应、异常处理、工具类 | | **[mx-spring-jdbc](mx-spring-jdbc/)** | 🗄️ MyBatis-Plus + 动态多数据源(MySQL / ClickHouse) | | **[mx-spring-redis](mx-spring-redis/)** | 🚀 Redis + Redisson 分布式锁 | | **[mx-spring-security](mx-spring-security/)** | 🔐 Sa-Token RBAC + 多租户 | | **[mx-spring-upload](mx-spring-upload/)** | 📁 文件上传:本地 / MinIO / 七牛 / 腾讯COS / 阿里OSS | | **[mx-spring-sms](mx-spring-sms/)** | 📩 短信:腾讯云 / 阿里云 / 中网 | | **[mx-spring-captcha](mx-spring-captcha/)** | 🤖 验证码服务(Caffeine / Redis) | | **[mx-spring-excel](mx-spring-excel/)** | 📊 EasyExcel + Jxls 模板 | | **[mx-spring-netty](mx-spring-netty/)** | 🌐 TCP Server/Client + WebSocket | | **[mx-spring-mqtt](mx-spring-mqtt/)** | 📡 MQTT 多客户端 | | **[mx-spring-modbus](mx-spring-modbus/)** | ⚙️ Modbus TCP 从站 | | **[mx-spring-work-robot](mx-spring-work-robot/)** | 🤖 企业微信机器人 | | **[mx-spring-maven-plugin](mx-spring-maven-plugin/)** | 🔧 代码生成 Maven 插件 | | **[mx-spring-app](mx-spring-app/)** | 🏗️ 骨架项目(Demo + Admin 监控) | | **[mx-spring-archetype](mx-spring-archetype/)** | 📋 Maven Archetype 模板 | | **[misc](misc/)** | 📖 完整配置参考 | ## 环境要求 - **JDK** 21+ - **Maven** 3.6+ - **Spring Boot** 3.2.12 ## 快速开始 ```bash # 1. 安装 git clone cd mx-spring-modules mvn clean install -DskipTests # 2. 创建新项目 mvn archetype:generate \ -DarchetypeGroupId=com.mx.modules \ -DarchetypeArtifactId=mx-spring-archetype \ -DarchetypeVersion=1.0.0 \ -DgroupId=com.mx \ -DartifactId=你的项目名 # 3. 运行 cd 你的项目名 mvn spring-boot:run -pl 你的项目名-admin # Admin 监控 → http://localhost:9090 mvn spring-boot:run -pl 你的项目名-demo # 业务服务 → http://localhost:8080 ``` ## 配置 完整配置参考:[misc/application-full.yml](misc/application-full.yml) ```yaml # 只需引入对应模块的配置段 mx: config: format-request: true # 请求日志 security: enabled: true # 安全认证 upload: type: local # 文件上传后端 netty: server: enable: true # Netty 服务端 mqtt: auto-init: true # MQTT 自动连接 ``` ## 包结构 确保启动类扫描 `com.mx`: ```java @SpringBootApplication @ComponentScan(basePackages = {"com.yourpackage", "com.mx"}) public class YourApplication { } ``` ## 骨架项目 通过 Archetype 创建的项目包含两个子模块: - **Admin**(端口 9090):Spring Boot Admin 监控面板,默认账号 `admin / admin123` - **Demo**(端口 8080):业务骨架,已集成 Actuator、Admin Client、打包脚本 ## License MIT