Skip to content

Make @ConditionalOnProperty @Repeatable #7368

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

Closed
wants to merge 2 commits into from
Closed

Make @ConditionalOnProperty @Repeatable #7368

wants to merge 2 commits into from

Conversation

michael-simons
Copy link
Contributor

This implements #2541 by providing @ConditionalOnProperties as container for @ConditionalOnProperty and making it repeatable.

Feel free to use this PR however you like. It's based on the 2.0 branch.

I do understand that the ticket is still open for team discussion. I could understand if you are afraid of opening up to make all Conditional* repeatable, but I think also that it is really useful for ConditionalOnProperty, at least we have several use cases.

Thanks!

This implements #2541 by providing @ConditionalOnProperties as container for @ConditionalOnProperty and making it repeatable.
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 11, 2016
I made a bad copy&paste error. The test was invalid. Build fails now, was not enough making annotation repeatable. Will fix asap.
@michael-simons
Copy link
Contributor Author

So, my naive approach that the condition evaluator will take care of repeatable annotations was wrong.

Implementing support for repeatable conditions should be provided in spring-context instead, but that's not for me to decide.

@philwebb
Copy link
Member

@michael-simons I think you're right. It's a bit tricky without some core framework updates.

@philwebb
Copy link
Member

Thanks anyway.

@philwebb philwebb added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants