A custom Spring Boot starter avoids interfering with the framework's own auto-configuration by using conditional annotations that back off whenever the user or another starter has already provided an equivalent bean, class, or property.
A custom caching starter defines a default CacheManager bean guarded by @ConditionalOnMissingBean(CacheManager.class), so if the consuming application defines its own CacheManager, the starter's default quietly steps aside instead of causing a conflict.
@Configuration
@ConditionalOnClass(CacheManager.class)
public class AcmeCacheAutoConfiguration {
@Bean
@ConditionalOnMissingBean
public CacheManager cacheManager() {
return new ConcurrentMapCacheManager();
}
}A concise interview answer is
I guard every bean in the starter's auto-configuration with @ConditionalOnMissingBean, @ConditionalOnClass, or @ConditionalOnProperty, so it only supplies a default when nothing else has already defined it. That mirrors how Spring Boot's own starters behave, and it means my starter adds functionality without ever fighting the application's own configuration.
Last updated: 11 November 2026
Previous question: How can you customize Spring Boot Actuator to report health metrics specific to your application?