Package com.wavemaker.commons.util
Class DefaultYamlProcessor
- java.lang.Object
-
- org.springframework.beans.factory.config.YamlProcessor
-
- com.wavemaker.commons.util.DefaultYamlProcessor
-
- Direct Known Subclasses:
WMYamlProcessor
public class DefaultYamlProcessor extends org.springframework.beans.factory.config.YamlProcessorThis class uses YamlProcessor to convert the yaml resources to properties.The Properties created by this class have nested paths for hierarchical objects, so for instance this YAML
environments: dev: url: https://dev.bar.com name: Developer Setup prod: url: https://foo.bar.com name: My Cool Appis transformed into these properties:environments.dev.url=https://dev.bar.com environments.dev.name=Developer Setup environments.prod.url=https://foo.bar.com environments.prod.name=My Cool App
Lists are split as property keys with[]dereferencers, for example this YAML:servers: - dev.bar.com - foo.bar.com
becomes properties like this:servers[0]=dev.bar.com servers[1]=foo.bar.com
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.springframework.beans.factory.config.YamlProcessor
org.springframework.beans.factory.config.YamlProcessor.DocumentMatcher, org.springframework.beans.factory.config.YamlProcessor.MatchCallback, org.springframework.beans.factory.config.YamlProcessor.MatchStatus, org.springframework.beans.factory.config.YamlProcessor.ResolutionMethod
-
-
Constructor Summary
Constructors Constructor Description DefaultYamlProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.PropertiesgetProperties()
-