SpringBootContextLoader
A ContextLoader that can be used to test Spring Boot applications (those that normally startup using SpringApplication). Although this loader can be used directly, most test will instead want to use it with @SpringBootTest.
The loader supports both standard MergedContextConfiguration as well as WebMergedContextConfiguration. If WebMergedContextConfiguration is used the context will either use a mock servlet environment, or start the full embedded web server.
If @ActiveProfiles
are provided in the test class they will be used to create the application context.
Author
Dave Syer
Phillip Webb
Andy Wilkinson
Stephane Nicoll
Madhura Bhave
Scott Frederick
Since
1.4.0
See also
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun loadContextForAotRuntime(mergedConfig: MergedContextConfiguration, initializer: ApplicationContextInitializer<ConfigurableApplicationContext>): ApplicationContext
Link copied to clipboard
Link copied to clipboard