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
.