Java,J2EE,Weblogic,Oracle

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

          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 龔椿深 閱讀(775) 評論(0)  編輯  收藏


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


          網站導航:
           
          主站蜘蛛池模板: 延寿县| 济阳县| 新化县| 曲松县| 图片| 勐海县| 乌海市| 顺昌县| 恩施市| 隆昌县| 台江县| 太白县| 普格县| 织金县| 文昌市| 聂拉木县| 南和县| 黔南| 石屏县| 怀化市| 五常市| 体育| 那曲县| 广德县| 兴安盟| 犍为县| 乾安县| 黔西县| 双鸭山市| 宣威市| 乐平市| 古浪县| 铜鼓县| 贺兰县| 太湖县| 井冈山市| 兴义市| 大荔县| 青铜峡市| 东丰县| 南汇区|