FasterXML / FasterXML/jackson-dataformats-text

Allow ENV and Java Props substitutions while reading YAML file

オープン
#28 コメント 4 件 リアクション 3 件 担当者 0 名 GitHub で見る
yaml
主要言語
Java
スター
455
フォーク
164
平均マージ
6日 10時間
マージ済み PR(30日)
2

説明

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}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。