SpringBoot- Custom Starter

step

Create xxxAutoConfiguration class 
add annotations @Configuration modified 
to add annotations @Conditionalxxx implantation conditions determined do 
add annotations @AutoConfigureOrder injection sequence 
is added after the injection operation @AutoConfigureAfter annotations 

created xxxProperties configuration class 
add annotation map @ConfigurationProperties Related 

xxxAutoConfiguration compound added @EnableConfigurationProperties injection configuration class 

reference WebMvcAutoConfiguration automatic injection type, etc.

mode

xxx-spring-boot-starter only used for import-dependent (POM project) 
xxx-the Spring-the autoConfigure the Boot-core application projects 
to third parties only introduced xxx-spring-boot-starter can rely 

reference mybatis-spring-boot-starter

  

  

Guess you like

Origin www.cnblogs.com/BINGJJFLY/p/12040453.html