Java,J2EE,Weblogic,Oracle

          java項目隨筆
          隨筆 - 90, 文章 - 6, 評論 - 61, 引用 - 0
          數(shù)據(jù)加載中……

          java工程如果加載多個配置文件

           1、      在Struts2.0 中加載多個 struts.xml   ,用<include file="........"></include>

               例如:
                <struts>
                      <include file="com/test/user/action/user_struts.xml"></include>
                     <include file="com/test/shop/action/shop_struts.xml"></include>
               </struts>

          2、        在Spring  中加載多個  xml ,用 <import resource="........"/>
                    例如:
               <beans xmlns="http://www.springframework.org/schema/beans"
                      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
                     <import resource="classpath:com/test/user/dao/user_dao.xml"/>
                     <import resource="classpath:com/test/shop/dao/shop_dao.xml"/>
              </beans>

          posted on 2008-09-07 01:55 龔椿深 閱讀(777) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導航:
           
          主站蜘蛛池模板: 霞浦县| 香格里拉县| 武夷山市| 尖扎县| 家居| 新兴县| 扬州市| 礼泉县| 乌兰浩特市| 康平县| 远安县| 青铜峡市| 涟水县| 潜江市| 福贡县| 乌恰县| 阿拉尔市| 抚宁县| 大港区| 建昌县| 宁都县| 兴隆县| 莎车县| 鄯善县| 尼玛县| 高尔夫| 浪卡子县| 元谋县| 东明县| 汾阳市| 巫山县| 农安县| 忻城县| 讷河市| 镇雄县| 中西区| 阿巴嘎旗| 昌乐县| 荔浦县| 石泉县| 昌平区|