zoukankan      html  css  js  c++  java
  • web.xml中加载spring的applicationContext.xml

    还是要好好看官方文档的。

      在web.xml中启动spring的三种方式:使用ContextLoaderServlet,ContextLoaderListener

    在spring3之后的版本中,去掉ContextLoaderServlet 启动方式。所以使用ContextLoaderListener方式。

    ContextLoaderListener方式: 

        <!-- 加载applicationcontext.xml -->
       <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!--contextConfigLocation在 ContextLoaderListener类中的默认值是 /WEB-INF/applicationContext.xml --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/applicationContext.xml</param-value> <!-- <param-value>classpath:applicationContext*.xml</param-value> --> </context-param>
    
    
  • 相关阅读:
    采样错误
    MathJax
    jupyter
    pip
    str操作
    Content-Type
    json转csv
    【tornado】静态文件
    dict 字典
    基于插件技术的GIS应用框架(C# + ArcEngine9.3)(一)
  • 原文地址:https://www.cnblogs.com/July74/p/6089123.html
Copyright © 2011-2022 走看看