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)站導(dǎo)航:
           
          主站蜘蛛池模板: 怀安县| 青神县| 定陶县| 湘潭市| 太康县| 陵水| 明星| 长沙县| 镇沅| 湘潭市| 昭觉县| 南开区| 连山| 瑞金市| 余干县| 当涂县| 昭平县| 建瓯市| 宿州市| 安庆市| 齐齐哈尔市| 双牌县| 黔西县| 景德镇市| 扎赉特旗| 康保县| 韶山市| 紫云| 花莲市| 隆回县| 高阳县| 修武县| 昌吉市| 栖霞市| 孟连| 怀安县| 张家港市| 吉林省| 江油市| 九寨沟县| 岗巴县|