当前位置: 代码迷 >> Web前端 >> 在web中实例化spring器皿
  详细解决方案

在web中实例化spring器皿

热度:88   发布时间:2012-10-10 13:58:11.0
在web中实例化spring容器
<!--指定spring的配置文件,默认从web根目录寻找配置文件,我们可以通过spring提供的classpath:前缀指定从类路径下寻找-->
        <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:beans.xml</param-value>
</context-param>

<!--对Spring容器进行实例化-->


<listener><listenerclass>org.springframework.web.context.ContextLoaderListener</listener-class></listener>
  相关解决方案