* The SpringApplicationBuilder was registering the parent context initializer
twice (not really a problem, but confusing if you are debugging).
* ParentContextApplicationContextInitializer itself should have been
checking that the current context is not the parent
* The EventPublishingRunListener as a result needs to call
setApplicationContext on any listeners that are AplicationContextAware
* ParentContextCloserApplicationListener can ensure that there is
only one of its kind per application context by implementing hashCode
and equals
Fixes gh-1142
@ -53,8 +53,10 @@ public class ParentContextApplicationContextInitializer implements
@@ -53,8 +53,10 @@ public class ParentContextApplicationContextInitializer implements
@ -70,7 +72,8 @@ public class ParentContextApplicationContextInitializer implements
@@ -70,7 +72,8 @@ public class ParentContextApplicationContextInitializer implements
@ -46,10 +59,12 @@ public class ParentContextCloserApplicationListener implements
@@ -46,10 +59,12 @@ public class ParentContextCloserApplicationListener implements
@ -82,6 +97,35 @@ public class ParentContextCloserApplicationListener implements
@@ -82,6 +97,35 @@ public class ParentContextCloserApplicationListener implements
@ -78,6 +79,9 @@ public class EventPublishingRunListener implements SpringApplicationRunListener
@@ -78,6 +79,9 @@ public class EventPublishingRunListener implements SpringApplicationRunListener