标签:
1、新建一个监听器,继承spring中的ContextLoaderListener。
监听器代码如下如:
2、在web.xml中的配置如下:
3、在spring配置文件applicationContext.xml的配置如下:
其中的entry标签可以为多个。value-ref中的值为需要启动线程的bean id.
spring启动时启动多个线程
原文地址:http://www.cnblogs.com/java-learning/p/5748363.html