| For the latest stable version, please use Spring Framework 6.2.4! | 
@ActiveProfiles
@ActiveProfiles is a class-level annotation that is used to declare which bean
definition profiles should be active when loading an ApplicationContext for an
integration test.
The following example indicates that the dev profile should be active:
- 
Java 
- 
Kotlin 
@ContextConfiguration
@ActiveProfiles("dev") (1)
class DeveloperTests {
	// class body...
}| 1 | Indicate that the devprofile should be active. | 
@ContextConfiguration
@ActiveProfiles("dev") (1)
class DeveloperTests {
	// class body...
}| 1 | Indicate that the devprofile should be active. | 
The following example indicates that both the dev and the integration profiles should
be active:
- 
Java 
- 
Kotlin 
@ContextConfiguration
@ActiveProfiles({"dev", "integration"}) (1)
class DeveloperIntegrationTests {
	// class body...
}| 1 | Indicate that the devandintegrationprofiles should be active. | 
@ContextConfiguration
@ActiveProfiles(["dev", "integration"]) (1)
class DeveloperIntegrationTests {
	// class body...
}| 1 | Indicate that the devandintegrationprofiles should be active. | 
| @ActiveProfilesprovides support for inheriting active bean definition profiles
declared by superclasses and enclosing classes by default. You can also resolve active
bean definition profiles programmatically by implementing a customActiveProfilesResolverand registering it by using theresolverattribute of@ActiveProfiles. | 
See Context Configuration with Environment Profiles,
@Nested test class configuration, and the
@ActiveProfiles javadoc for
examples and further details.