Package org.eclipse.microprofile.config.spi
@Version("1.1")
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
..
- Create a builder:
ConfigProviderResolver resolver = ConfigProviderResolver.instance();
ConfigBuilder builder = resolver.getBuilder();
- Add config sources and build:
Config config = builder.addDefaultSources().withSources(mySource).withConverters(myConverter).build;
- (optional)Manage the lifecycle of the config
resolver.registerConfig(config, classloader);
resolver.releaseConfig(config);
-
ClassDescriptionBuilder for manually creating an instance of a
Config
.This class is not intended to be used by end-users but for portable container integration purpose only.Implement this interfaces to provide a ConfigSource.Implement this interfaces to provide multiple ConfigSources.Converter<T>Interface for converting configured values from String to any Java type.