FasterXML / FasterXML/jackson-dataformats-text

Allow ENV and Java Props substitutions while reading YAML file

Ouverte
#28 4 commentaires 3 réactions 0 personnes assignées Voir sur GitHub
yaml
Langage dominant
Java
Étoiles
455
Forks
164
Merge moyen
6 j 10 h
PR mergées (30 j)
2

Description

I'm looking for a feature similar to Spring, HandleBar, etc that would allow me to create a yaml (or any format) file that includes a reference to system variables during read. Having to "pre-process" a file using templating tools before launching an application is cumbersome and error-prone vs having a standard by which variables can be defined by the user (vs the developer) when crafting the files and then merged into the content delivered to the application. I realize the request is "extending" the yaml, json, etc standard but the point of libraries such as Jackson is to help establish new standards.

example:

```
system:
host: ${HOSTNAME:defaulthost}
port: ${PORT:8080}
```
if you wanted to allow the control of the source (System ENV vs Java Property) you could use a syntax as follows.

```
system:
port: ${ENV:PORT:8080}
port: ${PROPERTY:PORT:8080}
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.