ContextLoaderListener与DispatcherServlet所加载的applicationContext的区别
http://starscream.iteye.com/blog/1107036
是使用Spring MVC时的Front Controller,并不会初始化applicationContext。
只使用它,肯定会找不到bean定义。
web程序必须使用org.springframework.web.context.ContextLoaderListener
org.springframework.web.context.ContextLoaderServlet
这两种中的一种来初始化container
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