Package org.eclipse.microprofile.config.spi


@Version("1.2") package org.eclipse.microprofile.config.spi

This package contains classes which are used to extend the standard functionality in a portable way.

A user can provide own ConfigSources and Converters to extend the information available in the Config.

The package also contains the class ConfigProviderResolver which is used to pick up the actual implementation.

Usage

This is used to build up a builder and manually add ConfigSources..

  1. Create a builder:
    ConfigProviderResolver resolver = ConfigProviderResolver.instance(); 
    ConfigBuilder builder = resolver.getBuilder();
  2. Add config sources and build:
     Config config = builder.addDefaultSources().withSources(mySource).withConverters(myConverter).build;
     
  3. (optional)Manage the lifecycle of the config
     resolver.registerConfig(config, classloader);
     resolver.releaseConfig(config);