dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-autoconfigure'
}
@Configuration
public class MyLibraryAutoConfigure {
}
@ConfigurationProperties("mylibrary")
public class MyLibraryProperties {
private boolean enableFeatureA = true;
private String featureB = "default value";
}
@Configuration
@EnableConfigurationProperties(MyLibraryProperties.class)
public class MyLibraryAutoConfigure {
}
mylibrary.enableFeatureA=false
mylibrary.featureB=custom value