Without extracting to autoconfig the @ConditionalOnMissingBean won't always work because it is dependent on the order of the configuration classes being processed (and autoconfig always somes last).