Skip to content

Overridden bean definitions may cause incorrect bean condition evaluation due to stale information being held by BeanTypeRegistry #13588

@prasenjit-net

Description

@prasenjit-net

I have an interface AuditEventRepository in my project which is definitely not same as org.springframework.boot.actuate.audit.AuditEventRepository and also has a different purpose. but this is clashing with the bean declared in org.springframework.boot.actuate.autoconfigure.audit.AuditEventsEndpointAutoConfiguration#auditEventsEndpoint

@Bean
@ConditionalOnMissingBean
@ConditionalOnBean(AuditEventRepository.class)
@ConditionalOnEnabledEndpoint
public AuditEventsEndpoint auditEventsEndpoint(
		AuditEventRepository auditEventRepository) {
	return new AuditEventsEndpoint(auditEventRepository);
}

Reproduction step:
Have a bean with class simple name AuditEventRepository.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions