# small-parent
**Repository Path**: small-template/small-parent
## Basic Information
- **Project Name**: small-parent
- **Description**: 顶级父工程
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-12-29
- **Last Updated**: 2026-01-14
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Small Template - 微服务模板项目
## 项目简介
Small Template 是一个微服务架构的顶级父工程,提供了一套完整的依赖版本约束,用于快速搭建微服务应用。该模板不包含实际业务逻辑,仅提供基础的依赖管理和项目结构。
## 依赖版本约束
### 核心框架版本
| 依赖名称 | 版本 | 说明 |
|---------|------------|------|
| Spring Boot | 2.7.18 | 基础框架 |
| Spring Cloud | 2021.0.8 | 微服务治理框架 |
| Spring Cloud Alibaba | 2021.0.5.0 | 阿里巴巴微服务组件 |
| Dubbo | 3.2.7 | 分布式服务框架 |
| MySQL | 8.0.33 | 数据库驱动 |
| MyBatis-Plus | 3.5.5 | ORM 框架增强版 |
| MyBatis | 3.5.13 | ORM 框架 |
| Lombok | 1.18.30 | 代码简化工具 |
### 常用工具组件版本
| 依赖名称 | 版本 | 说明 |
|---------|----------|------|
| Guava | 31.1-jre | Google 核心库 |
| Swagger | 2.9.2 | API 文档生成工具 |
| Fastjson | 1.2.83 | JSON 处理库 |
| Commons-lang3 | 3.12.0 | Apache 工具类库 |
| JUnit | 4.13.2 | 单元测试框架 |
| Druid | 1.2.16 | 数据库连接池 |
### 版本兼容性说明
- Spring Boot 2.7.x 与 Spring Cloud 2021.0.x 兼容
- Spring Cloud 2021.0.x 与 Spring Cloud Alibaba 2021.0.5.0 兼容
- Dubbo 3.2.7 与 Spring Boot 2.7.x 兼容
- MyBatis-Plus 3.5.3.1 与 Spring Boot 2.7.x 兼容
- MyBatis 3.5.13 与 Spring Boot 2.7.x 兼容
- Guava 31.1-jre 与 Java 8+ 兼容
- Swagger 3.0.0 与 Spring Boot 2.7.x 兼容
- Fastjson 1.2.83 与 Java 8+ 兼容
- Commons-lang3 3.12.0 与 Java 8+ 兼容
- JUnit 4.13.2 与 Java 8+ 兼容
- Druid 1.2.16 与 Spring Boot 2.7.x 兼容
## 使用方法
### 1. 创建子模块
在父工程下创建子模块,继承该父工程:
```xml
com.zh
small-parent
1.0-SNAPSHOT
```
### 2. 添加依赖
在子模块中添加需要的依赖,无需指定版本(版本由父工程统一管理):
```xml
org.springframework.boot
spring-boot-starter-web
mysql
mysql-connector-java
com.baomidou
mybatis-plus-boot-starter
org.projectlombok
lombok
provided
```
### 3. 开发微服务
根据业务需求开发微服务应用,使用父工程提供的依赖版本约束。
## 项目结构
```
small-parent/
├── pom.xml # 父工程 POM 文件,定义依赖版本约束
├── README.md # 项目说明文档
└── .gitignore # Git 忽略文件配置
```
## 注意事项
1. 所有子模块必须继承该父工程,以确保依赖版本一致
2. 如需修改依赖版本,请在父工程的 `properties` 中统一修改
3. 新增依赖时,请确保与现有依赖版本兼容
4. 使用 `mvn dependency:tree` 命令查看依赖树,确保没有版本冲突
## 许可证
MIT License