FasterXML / FasterXML/jackson-dataformats-text
Allow ENV and Java Props substitutions while reading YAML file
- 主要语言
- Java
- 星标
- 455
- 派生
- 164
- 平均合并
- 6 天 10 小时
- 30 天内合并 PR
- 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 还没有评估数据。