root.setServletContext(sc); root.setConfigLocations(new String[] {"/org/springframework/web/context/WEB-INF/applicationContext.xml"}); root.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() { @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
public void customizeContext(ServletContext servletContext, ConfigurableWebApplicationContext configurableWebApplicationContext) { SpringBeanProcessor processor = null; ResteasyDeployment deployment = (ResteasyDeployment) servletContext.getAttribute(ResteasyDeployment.class.getName()); if (deployment == null) { throw new RuntimeException(Messages.MESSAGES.deploymentIsNull()); } processor = new SpringBeanProcessor(deployment); configurableWebApplicationContext.addBeanFactoryPostProcessor(processor); configurableWebApplicationContext.addApplicationListener(processor); } }
private void addConfigurationPropertyReplacer(ConfigurableWebApplicationContext wac, final Properties properties) { wac.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() { public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { PropertyPlaceholderConfigurer cfg = new PropertyPlaceholderConfigurer(); cfg.setProperties(properties); cfg.postProcessBeanFactory(beanFactory); } }); }
public static void addAutowiredSupport(ConfigurableWebApplicationContext wac) { wac.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() { public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { final AutowiredAnnotationBeanPostProcessor autowireProcessor = new AutowiredAnnotationBeanPostProcessor(); autowireProcessor.setBeanFactory(beanFactory); beanFactory.addBeanPostProcessor(autowireProcessor); } }); }
private void addConfigurationAndLoaderAsSingletonsInContext(ConfigurableWebApplicationContext wac, final Configuration configuration, final ConfigurationLoader loader) { wac.addBeanFactoryPostProcessor(new BeanFactoryPostProcessor() { public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { beanFactory.registerSingleton("aksessConfiguration", configuration); beanFactory.registerSingleton("aksessConfigurationLoader", loader); } }); }
@Override public synchronized void addBeanFactoryPostProcessor(BeanFactoryPostProcessor arg0) { this.appContext.addBeanFactoryPostProcessor(arg0); }
protected void customizeContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext) { super.customizeContext(servletContext, applicationContext); applicationContext.addBeanFactoryPostProcessor(new BootProcessor()); }
@Override public void customizeApplicationContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext) { applicationContext.addBeanFactoryPostProcessor(new SymbolBeanFactoryPostProcessor(symbolSource)); } };
@Override public void customizeApplicationContext(ServletContext servletContext, ConfigurableWebApplicationContext applicationContext) { applicationContext.addBeanFactoryPostProcessor(new SymbolBeanFactoryPostProcessor(symbolSource)); } };
public static void addAppDirPropertySupport(ConfigurableWebApplicationContext wac) { PropertyPlaceholderConfigurer configurer = new PropertyPlaceholderConfigurer(); final Properties properties = Aksess.getConfiguration().getProperties(); File dataDir = (File) wac.getServletContext().getAttribute(OpenAksessContextLoaderListener.APPLICATION_DIRECTORY); properties.setProperty("appDir", dataDir.getAbsolutePath()); configurer.setProperties(properties); configurer.setIgnoreUnresolvablePlaceholders(true); wac.addBeanFactoryPostProcessor(configurer); }
public void start(ServletContext context) { parentContext.setServletContext(context); parentContext.addBeanFactoryPostProcessor(new BeanRegistrationProcessor(this)); parentContext.refresh(); parentContext.start(); }
getContextConfigLocation(), ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS)); wac.addBeanFactoryPostProcessor( new BeanFactoryPostProcessor() { public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
getContextConfigLocation(), ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS)); wac.addBeanFactoryPostProcessor( new BeanFactoryPostProcessor() { public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
getContextConfigLocation(), ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS)); wac.addBeanFactoryPostProcessor( new BeanFactoryPostProcessor() { public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {