I'm creating a custom spring boot starter which configures a bean from a different spring boot starter.
// my custom starter's build.gradle
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
}
// my-custom-starter's auto configuration
@Autoconfiguration
public class MyAutoconfiguration {
@Bean
public JwtDecoder jwtDecoder() {
return ...
}
}
In my testing, it seems like whoever imports my custom starter needs to also bring in spring-boot-starter-oauth2-client as a dependency if they want access to the JwtDecoder, unless I change it to an api dependency:
// my custom starter's build.gradle
dependencies {
api 'org.springframework.boot:spring-boot-starter-oauth2-client'
}
Is this a bad practice, or would it cause issues in the future with conflicting dependencies?