Interface ActiveProfilesResolver

All Known Implementing Classes:
DefaultActiveProfilesResolver
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ActiveProfilesResolver
Strategy interface for programmatically resolving which active bean definition profiles should be used when loading an ApplicationContext for a test class.

A custom ActiveProfilesResolver can be registered via the resolver attribute of @ActiveProfiles.

Concrete implementations must provide a public no-args constructor.

Since:
4.0
Author:
Sam Brannen, Michail Nikolaev
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    resolve(Class<?> testClass)
    Resolve the bean definition profiles to use when loading an ApplicationContext for the given test class.
  • Method Details

    • resolve

      String[] resolve(Class<?> testClass)
      Resolve the bean definition profiles to use when loading an ApplicationContext for the given test class.
      Parameters:
      testClass - the test class for which the profiles should be resolved; never null
      Returns:
      the bean definition profiles to use when loading the ApplicationContext; never null
      See Also: