Java,J2EE,Weblogic,Oracle

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

          java工程如果加載多個(gè)配置文件

           1、      在Struts2.0 中加載多個(gè) 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  中加載多個(gè)  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) 評(píng)論(0)  編輯  收藏


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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 婺源县| 隆化县| 阳春市| 准格尔旗| 淮滨县| 和平县| 乐东| 石首市| 安多县| 临西县| 阜阳市| 亚东县| 合作市| 方山县| 葫芦岛市| 卢氏县| 汨罗市| 潜江市| 濮阳市| 万年县| 新巴尔虎右旗| 德庆县| 大埔县| 南乐县| 肇东市| 曲水县| 鹤峰县| 新绛县| 科技| 新化县| 景宁| 平原县| 河东区| 平顶山市| 海晏县| 南城县| 江陵县| 台江县| 苏州市| 长岛县| 青阳县|