Interface TestRuntimeHintsRegistrar


public interface TestRuntimeHintsRegistrar
Contract for registering RuntimeHints for integration tests run with the Spring TestContext Framework based on the ClassLoader of the deployment unit. Implementations should, if possible, use the specified ClassLoader to determine if hints have to be contributed.

Implementations of this interface must be registered statically in META-INF/spring/aot.factories by using the fully qualified name of this interface as the key. A standard no-arg constructor is required for implementations.

This API serves as a companion to the core RuntimeHintsRegistrar API. If you need to register global hints for testing support that are not specific to a particular test class or MergedContextConfiguration, favor implementing RuntimeHintsRegistrar over this API.

Since:
6.0
Author:
Sam Brannen
See Also:
  • Method Details

    • registerHints

      void registerHints(MergedContextConfiguration mergedConfig, List<Class<?>> testClasses, RuntimeHints runtimeHints, ClassLoader classLoader)
      Contribute hints to the given RuntimeHints instance.
      Parameters:
      mergedConfig - the merged context configuration to process
      testClasses - the test classes that share the supplied merged context configuration
      runtimeHints - the RuntimeHints to use
      classLoader - the classloader to use