web服務啟動spring 后自啟動實現方法:
1> 寫一個類繼承spring的ApplicationListener監聽,並監控ContextRefreshedEvent事件(容易初始化完成事件)
2> 在applicationContext.xml文件中配置相應的bean實現自動裝載
定義簡單的bean:<bean id="beanDefineConfigue" class="com.creatar.portal.webservice.BeanDefineConfigue"></bean>
在applicationContext.xml中注冊完成后,保持@Service注解