# spring-boot-xxx-starter **Repository Path**: humdeef/spring-boot-xxx-starter ## Basic Information - **Project Name**: spring-boot-xxx-starter - **Description**: 如何编写spring-boot-xxx-starter - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2018-12-04 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README 如何实现一个spring-boot-xxx-starter? 第一步: 在resource/META-INF目录下面创建spring.factories文件 org.springframework.boot.autoconfigure.EnableAutoConfiguration = \ com.service.core.ServiceConfig\ 其中com.service.core.ServiceConfig就是指定要加载的类 第二步: @Configurable //作为配置加到spring容器中 @ComponentScan(basePackageClasses = ServiceConfig.class) //定义需要扫描的类型,获取需要扫描的包 public class ServiceConfig { } 第三步: 在spring容器中引用该bean