接口 ActiveProfilesResolver
- 所有已知实现类:
DefaultActiveProfilesResolver
public interface ActiveProfilesResolver
Strategy interface for programmatically resolving which active bean definition profiles should be used when loading anApplicationContext
for a test class.A custom
ActiveProfilesResolver
can be registered via theresolver
attribute of@ActiveProfiles
.Concrete implementations must provide a
public
no-args constructor.- 从以下版本开始:
- 4.0
- 作者:
- Sam Brannen, Michail Nikolaev
- 另请参阅:
ActiveProfiles
方法详细资料
resolve
String[] resolve(Class<?> testClass)
Resolve the bean definition profiles to use when loading anApplicationContext
for the given test class.- 参数:
testClass
- the test class for which the profiles should be resolved; nevernull
- 返回:
- the list of bean definition profiles to use when loading the
ApplicationContext
; nevernull
- 另请参阅:
ActiveProfiles.resolver()
,ActiveProfiles.inheritProfiles()