As pointed out in the issue #30688 the conditions on the overloaded beans aren't honored in all cases.
This is due to the fact that the ConfigurationClassBeanDefinitionReader
class bases its logic about which bean method should be skipped on the method name only. The solution provides a brand-new method String getMethodSignature();
in the MethodMetadata
class, based on which will be decided if a bean should be skipped.
Comment From: quaff
I confirm this PR fixes https://github.com/spring-projects/spring-framework/issues/30688
Comment From: quaff
Related to https://github.com/spring-projects/spring-framework/issues/31073
Comment From: snicoll
Thanks for the PR but we've declined this use case, see https://github.com/spring-projects/spring-framework/issues/30688#issuecomment-1687931033