ContextLoaderListener的作用

在启动Web容器时,ContextLoaderListener监听器会自动装配applicationContext.xml的信息。因为ContextLoaderListener实现了ServletContextListener接口,在Web.xml中要配置这个监听器。

因此,在启动Web容器时需要一些初始化信息,就可以继承ContextLoaderListtenner实现。

posted @ 2017-05-22 08:31  quincey.zhang  阅读(166)  评论(0编辑  收藏  举报