You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to autowire the component from code like the following
{code:}
class NestedBeans { @Component
static class StaticNested extends NestedBeans {}
}
results in a NoUniqueBeanDefinitionException:
{code:}
NoUniqueBeanDefinitionException: No qualifying bean of type [com.example.NestedBeans$StaticNested] is defined: expected single matching bean but found 2: nestedBeans.StaticNested,com.example.NestedBeans$StaticNested
We can work around this by explicitly naming the component (see branch "named" in the reproduction repo). It also disappears when the nested class does not extend the containing class.