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

Include @ConditionalOnMissingBean and @ConditionalOnClass from Spring Boot [SPR-11296] #15920

Open
spring-issuemaster opened this issue Jan 8, 2014 · 2 comments

Comments

Projects
None yet
1 participant
@spring-issuemaster
Copy link
Collaborator

commented Jan 8, 2014

Oliver Drotbohm opened SPR-11296 and commented

@ConditionalOnMissingBean and @ConditionalOnClass allow to selectively register bean definitions in case a different bean definition is already registered or a type being present on the classpath.

This is really useful to ecosystem projects to be able to pick up user configuration or fall back to defaults otherwise without necessarily creating a dependency on Spring Boot (which might cause a cyclic dependency if boot provides additional defaulting).


Issue Links:

  • #15592 Port @ConditionalOn... from Spring Boot into Spring Core

5 votes, 7 watchers

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 8, 2014

Oliver Drotbohm commented

/cc Dave Syer

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 11, 2014

Dave Syer commented

One problem is that @ConditionalOnMissingBean(annotations=...) really doesn't work yet, even after some last minute changes to Spring 4.0 to try and support it - it tends to trigger early instantiation of @Configuration beans with fairly disasterous consequences. I think we should try and address that before migrating the @Conditional features to spring-framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.