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

Allow to fetch multiple config parameters as a Map #17578

Closed
essobedo opened this issue Jun 1, 2021 · 2 comments
Closed

Allow to fetch multiple config parameters as a Map #17578

essobedo opened this issue Jun 1, 2021 · 2 comments
Labels
kind/enhancement New feature or request

Comments

@essobedo
Copy link
Contributor

essobedo commented Jun 1, 2021

Description

When we need a dynamic configuration, it can be very helpful to use a map. For example, let's say that I want to keep in my configuration the custom reason phrases to return to the enduser according to the http status code.

I would like to have:

The expected code

@ConfigProperty(name = "reasons")
Map<Integer, String> reasonPhrases; // or eventually Map<String, String>

The expected configuration

reasons.200=My custom reason phrase for OK
reasons.201=My custom reason phrase for Created
...
@essobedo
Copy link
Contributor Author

essobedo commented Jun 1, 2021

Corresponding PR #17579

@essobedo
Copy link
Contributor Author

Duplicates #17269

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant