java.lang.Object
io.helidon.config.yaml.mp.YamlMpConfigSource
- All Implemented Interfaces:
- ConfigSource
MicroProfile 
ConfigSource that can be used
 to add YAML files from classpath or file system using the
 ConfigProviderResolver.getBuilder().
 The YAML file is transformed to a flat map as follows:
Object nodesEach node in the tree is dot separated.
 server:
     host: "localhost"
     port: 8080
 
 Will be transformed to the following properties:
 server.host=localhost server.port=8080List nodes (arrays)
Each node will be indexed (0 based)
 providers:
   - abac:
       enabled: true
 names: ["first", "second", "third"]
 
 Will be transformed to the following properties:
 providers.0.abac.enabled=true names.0=first names.1=second names.2=third
- 
Field SummaryFields inherited from interface org.eclipse.microprofile.config.spi.ConfigSourceCONFIG_ORDINAL, DEFAULT_ORDINAL
- 
Method SummaryModifier and TypeMethodDescriptionstatic List<ConfigSource>Create from YAML file(s) on classpath.static List<ConfigSource>Create from YAML file(s) on classpath with profile support.static List<ConfigSource>classPath(String resource, String profile, ClassLoader classLoader) Create from YAML file(s) on classpath from specified classloader with profile support.static ConfigSourceCreate from YAML content as a reader.static ConfigSourceLoad a YAML config source from URL.static ConfigSourceLoad a YAML config source from file system.getName()Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.microprofile.config.spi.ConfigSourcegetOrdinal
- 
Method Details- 
createLoad a YAML config source from file system.- Parameters:
- path- path to the YAML file
- Returns:
- config source loaded from the file
- See Also:
 
- 
createLoad a YAML config source from URL. The URL may be any URL which is support by the used JVM.- Parameters:
- url- url of the resource
- Returns:
- config source loaded from the URL
 
- 
createCreate from YAML content as a reader. This method will NOT close the reader.- Parameters:
- name- name of the config source
- content- reader with the YAML content
- Returns:
- config source loaded from the content
 
- 
classPathCreate from YAML file(s) on classpath.- Parameters:
- resource- resource name to locate on classpath (looks for all instances)
- Returns:
- list of config sources discovered (may be zero length)
 
- 
classPathCreate from YAML file(s) on classpath with profile support.- Parameters:
- resource- resource name to locate on classpath (looks for all instances)
- profile- configuration profile to use, must not be null
- Returns:
- list of config sources discovered (may be zero length)
 
- 
classPathpublic static List<ConfigSource> classPath(String resource, String profile, ClassLoader classLoader) Create from YAML file(s) on classpath from specified classloader with profile support.- Parameters:
- resource- resource name to locate on classpath (looks for all instances)
- profile- configuration profile to use, must not be null
- classLoader- classloader where resource will be retrieved from
- Returns:
- list of config sources discovered (may be zero length)
 
- 
getPropertyNames- Specified by:
- getPropertyNamesin interface- ConfigSource
 
- 
getProperties- Specified by:
- getPropertiesin interface- ConfigSource
 
- 
getValue- Specified by:
- getValuein interface- ConfigSource
 
- 
getName- Specified by:
- getNamein interface- ConfigSource
 
 
-