-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Open
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: waiting-for-triageAn issue we've not yet triaged or decided onAn issue we've not yet triaged or decided on
Description
Here is a simple code sample:
@Configuration(proxyBeanMethods = false)
public class FooAutoConfiguration {
@ConditionalOnBean(FooProperties.class)
@ConditionalOnMissingBean
@Bean
public FooService fooService(FooProperties fooProperties) {
return new FooService();
}
}
pom.xml
...
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.0</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
...
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
</dependencies>
While evaluator conditional of FooService
, It will be evaluated twice for OnBeanCondition
because the AnnotatedTypeMetadata.getAllAnnotationAttributes
returned value contains same className array org.springframework.boot.autoconfigure.condition.OnBeanCondition
.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)status: waiting-for-triageAn issue we've not yet triaged or decided onAn issue we've not yet triaged or decided on