Class DefaultActiveProfilesResolver
java.lang.Object
org.springframework.test.context.support.DefaultActiveProfilesResolver
- All Implemented Interfaces:
ActiveProfilesResolver
Default implementation of the
ActiveProfilesResolver strategy that
resolves active bean definition profiles based solely on profiles
configured declaratively via ActiveProfiles.profiles() or
ActiveProfiles.value().
Note that the
spring.profiles.active property (whether configured as a JVM system property
or environment variable) is not taken into account by this resolver. If you need
to allow spring.profiles.active to override profiles configured via
@ActiveProfiles, you can implement a custom
ActiveProfilesResolver and register it via ActiveProfiles.resolver().
- Since:
- 4.1
- Author:
- Sam Brannen
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]Resolve the bean definition profiles for the given test class based on profiles configured declaratively viaActiveProfiles.profiles()orActiveProfiles.value().
-
Constructor Details
-
DefaultActiveProfilesResolver
public DefaultActiveProfilesResolver()
-
-
Method Details
-
resolve
Resolve the bean definition profiles for the given test class based on profiles configured declaratively viaActiveProfiles.profiles()orActiveProfiles.value().- Specified by:
resolvein interfaceActiveProfilesResolver- Parameters:
testClass- the test class for which the profiles should be resolved; nevernull- Returns:
- the bean definition profiles to use when loading the
ApplicationContext; nevernull - See Also:
-