# spring-boot-starter-demo **Repository Path**: tree_boss/spring-boot-starter-demo ## Basic Information - **Project Name**: spring-boot-starter-demo - **Description**: 自定义 spring-boot-starter - **Primary Language**: Java - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-04 - **Last Updated**: 2025-11-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Spring Boot Starter Demo 这是一个自定义Spring Boot Starter的示例项目,展示了如何创建和使用Spring Boot自动配置模块。 ## 项目结构 ``` spring-boot-starter-demo/ ├── custom-spring-boot-autoconfigure/ # 自动配置模块 ├── custom-spring-boot-starter/ # Starter模块 └── use-custom-spring-boot-starter/ # 使用示例模块 ``` ## 模块说明 ### 1. custom-spring-boot-autoconfigure 自动配置核心模块,包含: - 自动配置类 - 条件配置 - 核心功能实现 - 配置属性类 ### 2. custom-spring-boot-starter Starter模块,作为依赖聚合,引入该模块即可自动触发自动配置。 ### 3. use-custom-spring-boot-starter 示例应用,演示如何使用自定义的Spring Boot Starter。 ## 快速开始 ### 构建项目 ```bash mvn clean install ``` ### 使用自定义Starter 1. 在您的Spring Boot项目中添加依赖: ```xml com.example custom-spring-boot-starter 1.0-SNAPSHOT ``` 2. 在application.properties或application.yml中配置相关属性 3. 直接注入所需的服务组件 ## 配置属性 详细的配置属性说明请参考自动配置模块中的属性类。 ## 开发指南 ### 添加新功能 1. 在autoconfigure模块中实现核心功能 2. 创建相应的自动配置类 3. 确保在META-INF/spring.factories中注册自动配置类 ### 测试 使用Spring Boot的测试支持进行单元测试和集成测试。 ## 版本历史 - 1.0-SNAPSHOT: 初始版本 ## 许可证 此项目采用MIT许可证 - 详情请参见LICENSE文件 ## 贡献 欢迎提交问题和拉取请求!