接口 ActiveProfilesResolver

所有已知实现类:
DefaultActiveProfilesResolver
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@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.

从以下版本开始:
4.0
作者:
Sam Brannen, Michail Nikolaev
另请参阅:
  • 方法概要

    修饰符和类型
    方法
    说明
    resolve(Class<?> testClass)
    Resolve the bean definition profiles to use when loading an ApplicationContext for the given test class.
  • 方法详细资料

    • resolve

      String[] resolve(Class<?> testClass)
      Resolve the bean definition profiles to use when loading an ApplicationContext for the given test class.
      参数:
      testClass - the test class for which the profiles should be resolved; never null
      返回:
      the list of bean definition profiles to use when loading the ApplicationContext; never null
      另请参阅: