Class ExternalPathConfigProvider

java.lang.Object
io.extact.rms.platform.config.ExternalPathConfigProvider
All Implemented Interfaces:
org.eclipse.microprofile.config.spi.ConfigSourceProvider

public class ExternalPathConfigProvider extends Object implements org.eclipse.microprofile.config.spi.ConfigSourceProvider
Read the YAML file of the specified path from the outside. There are two ways to specify the path from the outside, A and B, and if both are set,A has priority.
Also, since this class is instantiated by ServiceLoader, if you want to use it, define this class in `META-INF/services/org.eclipse.microprofile.config.spi.ConfigSourceProvider`
The path specification method is as follows.

Path by system property

 $ java -Dext.config.path=/path/to/file MainClass
 
 

Path by Environment variable

 $ export EXT_CONFIG_PATH=/path/to/file
 $ java MainClass
 
 If the path is not specified, nothing is done.
  • Field Details

  • Constructor Details

    • ExternalPathConfigProvider

      public ExternalPathConfigProvider()
  • Method Details

    • getConfigSources

      public Iterable<org.eclipse.microprofile.config.spi.ConfigSource> getConfigSources(ClassLoader forClassLoader)
      Specified by:
      getConfigSources in interface org.eclipse.microprofile.config.spi.ConfigSourceProvider