Interface ApplicationContextPreProcessor
public interface ApplicationContextPreProcessor
Hook to customize the spring application context before it is populated
- Since:
- 2.6
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisSpringPoweredBundle(org.osgi.framework.Bundle bundle) Detects if this bundle is a Spring bundle.voidprocess(org.osgi.framework.Bundle bundle, org.springframework.context.ConfigurableApplicationContext applicationContext) Process a context before it is populated, usually via addingBeanFactoryPostProcessorinstances.
-
Method Details
-
isSpringPoweredBundle
boolean isSpringPoweredBundle(org.osgi.framework.Bundle bundle) Detects if this bundle is a Spring bundle. This allows a pre-processor to have a Spring context built for a bundle even if the bundle doesn't have the Spring context header or any XML files in META-INF/spring.- Parameters:
bundle- The bundle to create an application context for- Returns:
- True if a spring context should be created, false otherwise
-
process
void process(org.osgi.framework.Bundle bundle, org.springframework.context.ConfigurableApplicationContext applicationContext) Process a context before it is populated, usually via addingBeanFactoryPostProcessorinstances.- Parameters:
bundle- The target bundleapplicationContext- The target application context before population
-