Class DotEnvConfigSourceProvider

java.lang.Object
io.smallrye.config.AbstractLocationConfigSourceLoader
io.smallrye.config.DotEnvConfigSourceProvider
All Implemented Interfaces:
org.eclipse.microprofile.config.spi.ConfigSourceProvider

public class DotEnvConfigSourceProvider extends AbstractLocationConfigSourceLoader implements org.eclipse.microprofile.config.spi.ConfigSourceProvider
  • Constructor Details

    • DotEnvConfigSourceProvider

      public DotEnvConfigSourceProvider()
    • DotEnvConfigSourceProvider

      public DotEnvConfigSourceProvider(String location)
  • Method Details

    • getFileExtensions

      protected String[] getFileExtensions()
      Description copied from class: AbstractLocationConfigSourceLoader
      The file extensions to filter the locations to load. It does not require to include the dot separator.
      Specified by:
      getFileExtensions in class AbstractLocationConfigSourceLoader
      Returns:
      an array with the file extensions.
    • loadConfigSource

      protected org.eclipse.microprofile.config.spi.ConfigSource loadConfigSource(URL url, int ordinal) throws IOException
      Description copied from class: AbstractLocationConfigSourceLoader
      Loads a ConfigSource from an URL. Implementations must construct the ConfigSource to load.
      Specified by:
      loadConfigSource in class AbstractLocationConfigSourceLoader
      Parameters:
      url - the URL to load the ConfigSource.
      ordinal - the ordinal of the ConfigSource.
      Returns:
      the loaded ConfigSource.
      Throws:
      IOException - if an error occurred when reading from the URL.
    • getConfigSources

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

      public static List<org.eclipse.microprofile.config.spi.ConfigSource> dotEnvSources(ClassLoader classLoader)
    • dotEnvSources

      public static List<org.eclipse.microprofile.config.spi.ConfigSource> dotEnvSources(String location, ClassLoader classLoader)