Revert SpringBootContextLoader and ErrorPageFilterIntegrationTests changes"
Spring Framework has change the signature so we no longer need the updates.
This commit is contained in:
@@ -84,13 +84,7 @@ import org.springframework.web.context.support.GenericWebApplicationContext;
|
|||||||
public class SpringBootContextLoader extends AbstractContextLoader {
|
public class SpringBootContextLoader extends AbstractContextLoader {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
|
||||||
public ApplicationContext loadContext(MergedContextConfiguration config) throws Exception {
|
public ApplicationContext loadContext(MergedContextConfiguration config) throws Exception {
|
||||||
return loadContext(config, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ApplicationContext loadContext(MergedContextConfiguration config, boolean refresh) throws Exception {
|
|
||||||
Class<?>[] configClasses = config.getClasses();
|
Class<?>[] configClasses = config.getClasses();
|
||||||
String[] configLocations = config.getLocations();
|
String[] configLocations = config.getLocations();
|
||||||
Assert.state(!ObjectUtils.isEmpty(configClasses) || !ObjectUtils.isEmpty(configLocations),
|
Assert.state(!ObjectUtils.isEmpty(configClasses) || !ObjectUtils.isEmpty(configLocations),
|
||||||
@@ -135,7 +129,6 @@ public class SpringBootContextLoader extends AbstractContextLoader {
|
|||||||
application.addListeners(new PrepareEnvironmentListener(config));
|
application.addListeners(new PrepareEnvironmentListener(config));
|
||||||
}
|
}
|
||||||
String[] args = SpringBootTestArgs.get(config.getContextCustomizers());
|
String[] args = SpringBootTestArgs.get(config.getContextCustomizers());
|
||||||
Assert.isTrue(refresh, "SpringBootContextLoader and only return refreshed contexts");
|
|
||||||
return application.run(args);
|
return application.run(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -179,13 +179,7 @@ class ErrorPageFilterIntegrationTests {
|
|||||||
private static final String[] EMPTY_RESOURCE_SUFFIXES = {};
|
private static final String[] EMPTY_RESOURCE_SUFFIXES = {};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
public ApplicationContext loadContext(MergedContextConfiguration config) {
|
||||||
public ApplicationContext loadContext(MergedContextConfiguration mergedConfig) throws Exception {
|
|
||||||
return loadContext(mergedConfig, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ApplicationContext loadContext(MergedContextConfiguration config, boolean refresh) {
|
|
||||||
AnnotationConfigServletWebServerApplicationContext context = new AnnotationConfigServletWebServerApplicationContext(
|
AnnotationConfigServletWebServerApplicationContext context = new AnnotationConfigServletWebServerApplicationContext(
|
||||||
config.getClasses());
|
config.getClasses());
|
||||||
context.registerShutdownHook();
|
context.registerShutdownHook();
|
||||||
|
|||||||
Reference in New Issue
Block a user