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

Conditional beans include support in commons-spring #432

Merged
merged 5 commits into from
Mar 6, 2023

Conversation

mhawryluk
Copy link
Contributor

@mhawryluk mhawryluk commented Mar 6, 2023

Issue #431

Makes it possible to include some config only if specified feature flag is enabled. The position of the conditionals list in the file doesn't matter, it will always overwrite other definitions in the file if condition is true. The order of conditional objects in the conditionals list does matter, the latter will possibly overwrite the former.

beans {
  ...
}

conditionals = [
  {condition: ${ump.feature.enabled}, config: {include "feature.conf"}},
  {condition: ${ump.coolStuff.enabled}, config: {x = 2}}
] 

@mhawryluk mhawryluk requested a review from ghik March 6, 2023 11:43
@mhawryluk mhawryluk requested a review from ghik March 6, 2023 13:07
@ghik ghik merged commit 6b61445 into AVSystem:master Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants