We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如题,在@ConditionalOnBean/@ConditionalOnMissingBean下:
@ConditionalOnMissingBean(value = UserService.class, parameterizedContainer = {ReferenceBean.class})
失效,在Condition相关注解扫描beanDefination时,获取的RootBD是Reference<?>,导致不能匹配,是否在registerBD时,未考虑泛型问题?
The text was updated successfully, but these errors were encountered:
AbstractBeanFactory
ResolvableType getTypeForFactoryBeanFromAttributes(AttributeAccessor attributes) { //注册Reference beanDefination时,是否可以设置目标类型 Object attribute = attributes.getAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE); if (attribute instanceof ResolvableType) { return (ResolvableType) attribute; } if (attribute instanceof Class) { return ResolvableType.forClass((Class<?>) attribute); } return ResolvableType.NONE; }
Sorry, something went wrong.
AbstractBeanFactory ResolvableType getTypeForFactoryBeanFromAttributes(AttributeAccessor attributes) { //注册Reference beanDefination时,是否可以设置目标类型 Object attribute = attributes.getAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE); if (attribute instanceof ResolvableType) { return (ResolvableType) attribute; } if (attribute instanceof Class) { return ResolvableType.forClass((Class<?>) attribute); } return ResolvableType.NONE; }
It is very good, simpler than decorated definition! But it is available since Spring 5.2, cannot be used in Spring 4.x .
No branches or pull requests
如题,在@ConditionalOnBean/@ConditionalOnMissingBean下:
失效,在Condition相关注解扫描beanDefination时,获取的RootBD是Reference<?>,导致不能匹配,是否在registerBD时,未考虑泛型问题?
The text was updated successfully, but these errors were encountered: