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

@ConfigItem Optional<Map<String,String>> does not work #7856

Closed
gastaldi opened this issue Mar 13, 2020 · 3 comments · Fixed by #19230
Closed

@ConfigItem Optional<Map<String,String>> does not work #7856

gastaldi opened this issue Mar 13, 2020 · 3 comments · Fixed by #19230
Labels
area/config kind/bug Something isn't working
Milestone

Comments

@gastaldi
Copy link
Contributor

Declaring a config as:

/**
 * Sets the placeholders to replace in SQL migration scripts.
 */
@ConfigItem
public Optional<Map<String, String>> placeholders = Optional.empty();

Always returns an Optional.empty() when having the following in the application.properties:

quarkus.flyway.placeholders.foo=bar
@gastaldi gastaldi added kind/bug Something isn't working area/config labels Mar 13, 2020
@sberyozkin
Copy link
Member

sberyozkin commented Mar 13, 2020

I wonder if it is similar to what is not working in OIDC at the moment, where I'd like to have an optional ConfigGroup:

@ConfigGroup
class SomeGroup {}

@ConfigItem
Optional<SomeGroup> someGroup;

(sorry I'll open another issue if it is not related)

@gastaldi
Copy link
Contributor Author

It may be related. If only I knew where the config is converted/parsed :)

@dmlloyd
Copy link
Member

dmlloyd commented Mar 13, 2020

It's probably a different issue @sberyozkin, but even if I'm wrong, it won't hurt to have two open issues for the problem (especially since they're two different symptoms).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants