-
Notifications
You must be signed in to change notification settings - Fork 799
Add FactoryBean.OBJECT_TYPE_ATTRIBUTE to registered beans #337
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
Comments
@philwebb something like this?
|
@MPoorter I'm unable to recreate the issue to validate a fix. I've copied code from #336 (comment) but the mock bean works without errors. |
@spencergibb It needs to be added to the attributes. Something more like this: beanDefinitionBuilder.getBeanDefinition()
.setAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE, className); |
ah, I figured I was missing something. Thanks @philwebb |
@MPoorter can you try Hoxton.BUILD-SNAPSHOTS? |
@spencergibb Just hit the same problem and it seems to be resolved in Hoxton.BUILD-20200515.034536-2455. Thx. |
wait until regular release train fixes it then create acceptable amount of tests spring-cloud/spring-cloud-openfeign#337
wait until regular release train fixes it then create acceptable amount of tests spring-cloud/spring-cloud-openfeign#337
See spring-projects/spring-boot#21379 for more background.
It would be helpful if
FeignClientsRegistrar
could add aFactoryBean.OBJECT_TYPE_ATTRIBUTE
attribute to the registered bean definition. The value of the attribute should be the type of bean that theFeignClientFactoryBean
will ultimately create.With such an attribute in place, it will be possible for Spring Boot's
@MockBean
support to tell the type without needing to instantiate the factory bean.The text was updated successfully, but these errors were encountered: