-
Notifications
You must be signed in to change notification settings - Fork 484
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
Add support for parsing Collections and Maps from the Spring YML format #739
Conversation
@@ -81,6 +82,14 @@ public Type getRawType() { | |||
return rawType; | |||
} | |||
|
|||
public boolean isMap() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe move these two to be private static helper methods in AbstractConfig? Then things would work with any ParametrizedType
, not just with ArchaiusType
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, moved these into the AbstractConfig instead
archaius2-core/src/main/java/com/netflix/archaius/config/AbstractConfig.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is almost there!
Could you add tests for ... ?
- Reading these through a config proxy
- Reading a non-string yml value (ie, something like
key: 1
with an unquoted int) - No regressions when reading the raw
mapNamePrefix.mapKey
as a "normal" key
Added some more tests to address these cases |
Add support for understanding the Spring YML (YamlPropertiesFactoryBean) way of parsing YML files via the Archaius endpoints. This supports the ConfigProxy and PropertyRepository as these all are eventually backed by AbstractConfig.
This enables all existing Archaius read methods to read multi-line/multi-property maps and arrays as specified by Spring.
Spring YML files are converted to configs from this yml file
To these configs: