-
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
ConfigMapping doesn't handler inner classes #17545
Comments
Hi @pjgg, The @ConfigMapping only supports interfaces. Any inner class should also be converted to an interface. |
What was the reason to not support inner classes with What suggested transition path for users who use |
From the experience we had, supporting classes adds way more complexity for little gain (fields visibility, reflection, types defaults values). Please check the additional discussion here: smallrye/smallrye-config#310
We can add one to the documentation.
Just convert the classes to use interfaces instead. They can still be used as inner to the main mapping interface. Check this example: https://quarkus.io/version/main/guides/config-mappings#nested-groups |
Thank you @radcortez is very well explained on the above documents! The transition path for end-users is clear, I mean the annotation |
Are we ok to close this issue then? |
Describe the bug
Quarkus Version: Upstream (2.x)
Deprecated class
org.eclipse.microprofile.config.inject.ConfigProperties
supports inner classesFor example:
application.properties
But the new
io.smallrye.config.ConfigMapping
class (that should be used instead of ConfigProperties) doesn't support inner classes:Exception:
This transition should be smooth for the users, or be supported.
Reproducer:
Project: https://github.com/pjgg/beefy-scenarios/tree/feat/remove-deprecated-code
Command:
mvn clean verify -pl 022-quarkus-properties-config-all
The text was updated successfully, but these errors were encountered: