Back port module to enable ConfigProxyFactory for legacy archaius #401
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change makes it possible to use
ConfigProxyFactory
with any application that still uses Archaius1 for its configuration. Libraries can now develop to the Archaius2 style of configuration using interfaces andConfigProxyFactory
to bind those interfaces to configuration.To enable just install
Archaius2BackportModule
on the injector and add configuration interface bindings as you would with Archaius2. Note that Archacius2Backport is meant to be installed instead ofArchaiusModule
andStaticArchaiusBridgeModule
.Note that there are a few minor restrictions here. This change does not add support for
@ConfigurationSource
annotations in applications still using Archaius1. For internal Netflix applications configuration classes would need to specify both@ConfigurationSource
(for Archaius2) and@NFProperties
(for Archaius1). @configuration is also not supported so library modules should specify the property prefix when creating a proxy instance.For example,
The above setup will load properties from 'myconfig.properties' into archaius and bind the properties