Class ThreadLocalConfigSourceProvider

java.lang.Object
org.eclipse.microprofile.config.spi.ConfigProviderResolver
io.smallrye.config.SmallRyeConfigProviderResolver
io.quarkus.test.config.ThreadLocalConfigSourceProvider

public class ThreadLocalConfigSourceProvider extends io.smallrye.config.SmallRyeConfigProviderResolver
A ThreadLocal ConfigSourceProvider, for Quarkus dev mode and integration tests.

These kind of tests may require additional configuration coming from dev services, test resources or test profiles. For such cases, the test creates a new Config with the additional configuration and replaces the current config with the new config on each test execution.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.smallrye.config.SmallRyeConfig
    get()
     
    io.smallrye.config.SmallRyeConfig
    get(ClassLoader classLoader)
     
    io.smallrye.config.Config
     
    io.smallrye.config.Config
    getConfig(ClassLoader classLoader)
     
    static void
     
    static void
    set(io.smallrye.config.Config config)
     

    Methods inherited from class io.smallrye.config.SmallRyeConfigProviderResolver

    getBuilder, registerConfig, releaseConfig, releaseConfig

    Methods inherited from class org.eclipse.microprofile.config.spi.ConfigProviderResolver

    instance, setInstance

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadLocalConfigSourceProvider

      public ThreadLocalConfigSourceProvider()
  • Method Details

    • getConfig

      public io.smallrye.config.Config getConfig()
      Overrides:
      getConfig in class io.smallrye.config.SmallRyeConfigProviderResolver
    • getConfig

      public io.smallrye.config.Config getConfig(ClassLoader classLoader)
      Overrides:
      getConfig in class io.smallrye.config.SmallRyeConfigProviderResolver
    • get

      public io.smallrye.config.SmallRyeConfig get()
      Overrides:
      get in class io.smallrye.config.SmallRyeConfigProviderResolver
    • get

      public io.smallrye.config.SmallRyeConfig get(ClassLoader classLoader)
      Overrides:
      get in class io.smallrye.config.SmallRyeConfigProviderResolver
    • set

      public static void set(io.smallrye.config.Config config)
    • reset

      public static void reset()