-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Description
Beginning in 1.1.3, the autoconfig report always includes the positive match:
DataSourceAutoConfiguration.DataSourceInitializerConfiguration
- @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer; SearchStrategy: all) found no beans (OnBeanCondition)
Since this match is conditional on the spring boot DataSourceInitializer, it will still be created even if the non-boot type org.springframework.jdbc.datasource.init.DataSourceInitializer is present. This wouldn't appear to be a big deal. The DataSourceInitializer won't do anything unless the schema.sql or data.sql are present (if I understand correctly), but since the "natural" name for both beans is dataSourceInitializer and the autoconfig one is created early (possibly related to #1115?) my bean was not created.
Changing the name of my bean to any other name resolves the issue, but perhaps the @ConditionalOnMissingBean should refer to the spring-jdbc type and not the boot specific type?