摘要: 最近用到在Tomcat服务器启动时自动加载数据到缓存,这就需要创建一个自定义的缓存监听器并实现ServletContextListener接口,并且在此自定义监听器中需要用到Spring的依赖注入功能.在web.xml文件中监听器配置如下:View Code 1 <listener> 2 <listener-class> 3 org.springframework.web.context.ContextLoaderListener 4 </listener-class> 5 </listener> 6 <listener> 7 ... 阅读全文
posted @ 2013-02-27 15:54 德赛克巴莱 阅读(500) 评论(0) 推荐(0) 编辑