转载:https://blog.youkuaiyun.com/mwb631714470/article/details/72408051
application-context.xml这个一般是采用非spring mvc架构,用来加载Application Context。
如果直接使用SpringMVC是可以不 添加applicationContext.xml文件的。
使用applicationContext.xml文件时是需要在web.xml中添加listener的:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
而这个一般是采用非spring mvc架构,如使用struts之类而又想引入spring才添加的,这个是用来加载Application Context。
如果直接采用SpringMVC,只需要把所有相关配置放到xxx-servlet.xml中就OK了。