WebApplicationContext初始化

来源:互联网 发布:百度数据挖掘笔试题 编辑:程序博客网 时间:2024/05/12 23:46

Spring 提供了用于启动WebApplicaionContext的Web容器监听器.

通过Web容器监听器引导:

 <!-- 1  指定配置文件 -->   <context-param>       <param-name>contextConfigLocation</param-name>       <param-value>/WEB-INF/beans.xml</param-value>  </context-param> <!-- 2 声明Web容器监听器 -->  <listener>      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>  </listener>



0 0
原创粉丝点击