-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Error with ConfigMapping using Maps and Nested Groups #20728
Error with ConfigMapping using Maps and Nested Groups #20728
Comments
Yes, this is a bug. It seems that internally, in a specific edge case we are considering that we already processed the @rudiger3d for now, to work around the problem, can you use different names for these methods? In the meanwhile, I'll work on a fix. |
@radcortez yes I can get started - the most important is that it actually is supposed to work. I am looking into migrating a Spring Boot application that uses this particularly combination, so going forward it would make things a lot easier if I don't have to make too many work arounds :) Thanks for the quick reply! |
I already have a fix. It should be available soon. Alternatively, because this is done in SR Config, you should be able to update the dependency manually (until it is available in Quarkus). |
Great! Will the fix also take into account the below example where the name I.e.
and application.properties
|
Yes, I've used your example to fix and test it. Check here: https://github.com/smallrye/smallrye-config/pull/649/files |
Describe the bug
I'm seeing errors when mapping configuration to objects using a combination of nested groups (https://quarkus.io/guides/config-mappings#nested-groups) and maps (https://quarkus.io/guides/config-mappings#maps) that I think is a bug.
Having:
and application.properties
The app fails to start because
However if I don't use a Map in my ConfigMapping class, e.g.
I don't get any errors.
Expected behavior
I expect that I am able to use Maps in my ConfigMapping class and that names at different levels of the config hierarchy does not "shadows" each other.
Actual behavior
It appears that when using Maps and Nested groups in a ConfigMapping class that names in different nested groups and at different levels of the config "shadows" each other.
How to Reproduce?
https://github.com/quarkusio/quarkus-quickstarts/tree/main/config-quickstart
Output of
uname -a
orver
Darwin everythingsruined 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "17" 2021-09-14 OpenJDK Runtime Environment Temurin-17+35 (build 17+35) OpenJDK 64-Bit Server VM Temurin-17+35 (build 17+35, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: