Add overridable, protected processBeforeRefresh(:ConfigurableApplicationContext):ConfigurableApplicationContext method and call in the newApplicationContext(..) method before the ApplicationContext is refreshed.
This commit is contained in:
@@ -54,6 +54,7 @@ public abstract class SpringApplicationContextIntegrationTestsSupport extends In
|
||||
|
||||
applicationContext.register(annotatedClasses);
|
||||
applicationContext.registerShutdownHook();
|
||||
processBeforeRefresh(applicationContext);
|
||||
applicationContext.refresh();
|
||||
|
||||
this.applicationContext = applicationContext;
|
||||
@@ -61,6 +62,10 @@ public abstract class SpringApplicationContextIntegrationTestsSupport extends In
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
protected ConfigurableApplicationContext processBeforeRefresh(ConfigurableApplicationContext applicationContext) {
|
||||
return applicationContext;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
protected <T extends ConfigurableApplicationContext> T getApplicationContext() {
|
||||
return (T) this.applicationContext;
|
||||
|
||||
Reference in New Issue
Block a user