FasterXML / FasterXML/jackson-future-ideas

Feature: Module that allows configuration overrides via environment variables and/or system properties

Offen
#53 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Keine Sprachdaten
Sterne
21
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

This is a feature suggestion to allow overrides on an arbitrary object via environment variables and system properties.

Given a configuration bean (or any bean) that has been de serialized by a configuration YAML or (H)JSON file, this allows ad-hoc/at runtime overrides of the values in the persistent data source. It stores any env var or prop starting with a prefix in a hash map (for example `MYAPP_FOO_BAR=1` or `-Dmyapp.foo.bar=1`) and then it turns the deserialized object back into a JsonTree, injects any discovered values from the environment, and recreates the object.

It's not ready for a pull request yet because I'm not sure this is in scope and I'm not sure about my implementation.
Please see it here:
https://github.com/ElderResearch/commons-jvm/blob/master/core/src/main/java/com/elderresearch/commons/lang/config/EnvironmentTree.java
specifically the `applyOverrides()`

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.