Skip to content

Commit 4fd8f37

Browse files
committed
Merge branch '2.2.x'
Closes gh-20503
2 parents 2f92261 + 9fbb664 commit 4fd8f37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/DevToolsDataSourceAutoConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ public ConfigurationPhase getConfigurationPhase() {
180180
@Override
181181
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
182182
ConditionMessage.Builder message = ConditionMessage.forCondition("DevTools DataSource Condition");
183-
String[] dataSourceBeanNames = context.getBeanFactory().getBeanNamesForType(DataSource.class);
183+
String[] dataSourceBeanNames = context.getBeanFactory().getBeanNamesForType(DataSource.class, true, false);
184184
if (dataSourceBeanNames.length != 1) {
185185
return ConditionOutcome.noMatch(message.didNotFind("a single DataSource bean").atAll());
186186
}
187-
if (context.getBeanFactory().getBeanNamesForType(DataSourceProperties.class).length != 1) {
187+
if (context.getBeanFactory().getBeanNamesForType(DataSourceProperties.class, true, false).length != 1) {
188188
return ConditionOutcome.noMatch(message.didNotFind("a single DataSourceProperties bean").atAll());
189189
}
190190
BeanDefinition dataSourceDefinition = context.getRegistry().getBeanDefinition(dataSourceBeanNames[0]);

0 commit comments

Comments
 (0)