Skip to content

Files

Latest commit

 

History

History

configsource-providers

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Back to config-ext

Configsource providers

Maven Central Javadocs

Util library that makes all Configsources available via CDI

Usage

    <dependency>
        <groupId>org.microprofile-ext.config-ext</groupId>
        <artifactId>configsource-providers</artifactId>
        <version>XXXX</version>
    </dependency>

Injecting sources

You can inject a certain ConfigSource by referencing it by name:

    @Inject @Name("MemoryConfigSource")
    private ConfigSource memoryConfigSource;

    @Inject @Name("SysPropConfigSource")
    private ConfigSource systemPropertiesConfigSource;

You can also get a Map of all config sources, with the key in the map the name of the source and the value the source:

    @Inject @ConfigSourceMap
    private Map<String,ConfigSource> configSourceMap;