zoukankan      html  css  js  c++  java
  • SSM整合-Spring里面applicationContext.xml文件能不能改成其他文件名?

    ContextLoaderListener是一个ServletContextListener,它在你的web应用启动的时候初始化。缺省情况下,它会在WEB-INF/applicationContext.xml文件找Spring的配置。你可以通过定义一个元素名字为”contextConfigLocation”来改变Spring配置文件的位置。示例如下:
    ————————————————


    或者

    <!--    spring的监听器 默认只加载web-inf下的applicationContext.xml-->
      <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
      </listener>
      <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationContext.xml</param-value>
      </context-param>
    












    种一棵树最好的时间是十年前,其次是现在。
  • 相关阅读:
    [NOI2014]动物园
    2018.7.15模拟赛
    2018.7.13模拟赛
    [CodeForces]920F SUM and REPLACE
    [BZOJ3211]花神游历各国
    [GSS5] Can you answer these queries V
    [SPOJ1716] GSS3
    [HNOI2012]排队
    2018.7.10模拟赛
    7.3模拟赛
  • 原文地址:https://www.cnblogs.com/islch/p/12801695.html
Copyright © 2011-2022 走看看