tags:

views:

38

answers:

2

Hi,

I have a method in a complex java program that needs to be called immediately after the web ApplicationContext and SpringBeans have been initialized.

I've tried toying around with <bean id="..." class="..." init-method="initialize"> but this method will call a applicationContext.get().getBean(beanId); method.

I was wondering if anyone knows how to do this.

Thank you.

+1  A: 

You could add a custom BeanFactoryPostProcessor which has access to the bean in question.

James Earl Douglas
+1  A: 

You may catch a ContextRefreshedEvent with ApplicationListener.

axtavt