ContextLoaderListener与DispatcherServlet所加载的applicationContext的区别

http://starscream.iteye.com/blog/1107036 

 

http://yonge812.iteye.com/blog/1535488

 

org.springframework.web.servlet.DispatcherServlet
是使用Spring MVC时的Front Controller,并不会初始化applicationContext。
只使用它,肯定会找不到bean定义。

web程序必须使用org.springframework.web.context.ContextLoaderListener
org.springframework.web.context.ContextLoaderServlet
这两种中的一种来初始化container 

 

 

posted on 2012-05-22 15:17  izumi  阅读(987)  评论(0)    收藏  举报

导航