New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleAliasRegistry misses log out in case of bean override [SPR-16871] #21410

Closed
spring-issuemaster opened this Issue May 25, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@spring-issuemaster
Copy link
Collaborator

spring-issuemaster commented May 25, 2018

Michael Decker opened SPR-16871 and commented

As we realized in Non unique bean producer method names are not invoked #13252, org.springframework.core.SimpleAliasRegistry.registerAlias(String, String) does not have any log output, if a bean is overridden, only an exception:

if (!allowAliasOverriding()) {
    throw new IllegalStateException("Cannot register alias '" + alias + "' for name '" +
            name + "': It is already registered for name '" + registeredName + "'.");
}

But these implementation does have a log output, if they override a bean:

org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader: INFO
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry: INFO
org.springframework.beans.factory.support.FactoryBeanRegistrySupport: INFO
org.springframework.beans.factory.support.AbstractBeanFactory: INFO
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory: INFO
org.springframework.beans.factory.support.DefaultListableBeanFactory: INFO

Perhaps it's even possible to have a common approach to log this. For example org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener: DEBUG is a great help to understand auto configuration conditional issues. Something similar for such an issue would be great.


Affects: 5.0.6

Reference URL: spring-projects/spring-boot#13252

Referenced from: commits 74fcdea, 8a56db6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment