posts - 88, comments - 3, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          Spring中classpath與classpath*的區別

          Posted on 2016-05-26 14:14 Milo的海域 閱讀(773) 評論(0)  編輯  收藏 所屬分類: Java
          http://stackoverflow.com/questions/3294423/spring-classpath-prefix-difference



            

          SIMPLE DEFINITION

          The classpath*:conf/appContext.xml simply means that all appContext.xml files under conf folders in all your jars on the classpath will be picked up and joined into one big application context.

          In contrast
          , classpath:conf/appContext.xml will load only one such file the first one found on your classpath.


          <bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
          <property name="locations">
          <list>
          <value>classpath:*.properties</value>
          <value>classpath*:*.properties</value>
          </list>
          </property>
          </bean>

          主站蜘蛛池模板: 醴陵市| 龙南县| 勃利县| 乐安县| 长春市| 洪湖市| 嘉义市| 始兴县| 高邑县| 洛扎县| 阿克苏市| 郴州市| 黄浦区| 遂溪县| 余庆县| 岢岚县| 灌阳县| 和田市| 新巴尔虎右旗| 郸城县| 龙陵县| 阿瓦提县| 华阴市| 会东县| 通城县| 政和县| 浦东新区| 专栏| 盐源县| 敖汉旗| 当雄县| 开封市| 腾冲县| 宣武区| 大冶市| 信宜市| 措勤县| 德令哈市| 海阳市| 赤壁市| 江安县|