From 68b25ebdb95af9584bfa850cf9973fba3e4787d9 Mon Sep 17 00:00:00 2001 From: John Blum Date: Mon, 13 Aug 2018 13:02:07 -0700 Subject: [PATCH] Add overridable, protected processBeforeRefresh(:ConfigurableApplicationContext):ConfigurableApplicationContext method and call in the newApplicationContext(..) method before the ApplicationContext is refreshed. --- .../SpringApplicationContextIntegrationTestsSupport.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/SpringApplicationContextIntegrationTestsSupport.java b/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/SpringApplicationContextIntegrationTestsSupport.java index c94187b..a1ee399 100644 --- a/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/SpringApplicationContextIntegrationTestsSupport.java +++ b/spring-data-geode-test/src/main/java/org/springframework/data/gemfire/tests/integration/SpringApplicationContextIntegrationTestsSupport.java @@ -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 getApplicationContext() { return (T) this.applicationContext;