<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring/applicationContext.xml</param-value>
</context-param>
<context-param/> 节点配置contextConfigLocation 属性是为了让ContextLoaderListener
找到Spring 上下文的位置并加载它,如果不指定contextConfigLocation,ContextLoaderListener
会到/WEB-INF/目录下找applicationContext.xml 来加载。
<listener/> 节点上配了ContextLoaderListener。它实现了ServletContextListener 接口,
所以web server 启动时ContextLoaderListener 能读取到ServletContext,也就能通过
<context-param/>指定的Spring 上下文的路径来找到上下文并加载它。