List of usage examples for org.springframework.context.support GenericApplicationContext getBeanFactoryPostProcessors
public List<BeanFactoryPostProcessor> getBeanFactoryPostProcessors()
From source file:org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin.java
private void invokeOnChangeListener(Map event) { onChangeListener.setDelegate(this); onChangeListener.call(new Object[] { event }); if (!(applicationContext instanceof GenericApplicationContext)) { return;/*from w w w.j a v a 2 s. c o m*/ } // Apply any factory post processors in case the change listener has changed any // bean definitions (GRAILS-5763) GenericApplicationContext ctx = (GenericApplicationContext) applicationContext; ConfigurableListableBeanFactory beanFactory = ctx.getBeanFactory(); for (BeanFactoryPostProcessor postProcessor : ctx.getBeanFactoryPostProcessors()) { try { postProcessor.postProcessBeanFactory(beanFactory); } catch (IllegalStateException e) { // post processor doesn't allow running again, just continue } } }
From source file:org.openadaptor.spring.SpringAdaptor.java
/** * Checks for the existence of a already defined property configurer in the given context. *///from w w w .j a v a 2s. c om private boolean isPropertyPlaceholderPresent(GenericApplicationContext context) { for (BeanFactoryPostProcessor bfpp : context.getBeanFactoryPostProcessors()) { if (bfpp instanceof PlaceholderConfigurerSupport) { return true; } } return false; }