步骤:
1.创建第三方项目,并build
这里在项目中随便建了2个class,建好项目后使用maven打包



2.创建springbootstarter项目,引入spring-boot-start,spring-boot-autoconfigure,第三方jar
3.如需生成配置元信息,加入spring-boot-configuration-processor依赖

4.编写ConfigurationProperties类和自动配置类,实现自动装载过程



5.配置发现配置文件 WETA-INF/spring.factories


6.打包,然后就可以在主项目中引入starter并通过配置自动装载了



网友评论