Skip to content
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

Override getRegistry() in RepositoryComponentProvider to make a BeanFactory available to condition evaluation [DATACMNS-1098] #1541

Closed
spring-projects-issues opened this issue Jun 23, 2017 · 1 comment

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Jun 23, 2017

Andy Wilkinson opened DATACMNS-1098 and commented

Unlike ClassPathBeanDefinitionScanner, RepositoryComponentProvider does not override getRegistry() so it will always return null. This means that any condition evaluation that's performed as a result of the scanning will be done without a BeanFactory available from the ConditionContext.

In the context of Spring Boot, this arrangement has previously meant that any condition evaluation that's performed won't be added to the condition evaluation report. Due to some nullable changes in Spring Framework it now means that a failure occurs. I'm not sure that's right, and will raise an SPR ticket, but it would be good to fix this regardless so that any condition evaluation can be added to the report


Affects: 2.0 M4 (Kay)

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

Backported to: 1.13.5 (Ingalls SR5)

@spring-projects-issues
Copy link
Author

@spring-projects-issues spring-projects-issues commented Jun 26, 2017

Oliver Drotbohm commented

I'm slightly puzzled as I wonder how to implement the method other than calling super.…? I don't have a BeanFactory handy at this point and I also wonder why I'd need to have one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants