沙漠中的魚

          欲上天堂,先下地獄
          posts - 0, comments - 56, trackbacks - 0, articles - 119
            BlogJava :: 首頁 ::  :: 聯(lián)系 :: 聚合  :: 管理

          關于在SSH中配置文件路徑的問題

          Posted on 2008-03-28 14:20 沙漠中的魚 閱讀(895) 評論(0)  編輯  收藏 所屬分類: 開源框架

          在最近開發(fā)項目過程中,我在spring配置文件使用這種配置

          <bean id="sessionFactory" lazy-init="true"
                class
          ="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
              
          <property name="mappingLocations">
                  
          <list>
          <value>classpath:resources/**/*.hbm.xml</value>
                  
          </list>
              
          </property>
          </bean>

          在web.xml里面

          <context-param> 
                  
          <param-name>contextConfigLocation</param-name> 
                  
          <param-value>/WEB-INF/applicationContext.xml,classpath:/**/applicationContext-*.xml</param-value> 
          </context-param>

          在tomcat中編譯能通過,在webshpere和weblogic下編譯不能通過,原來是不支正則表達式
          只好一個一個的添加上去
          spring配置文件

          <bean id="sessionFactory" lazy-init="true"
                class
          ="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
              
          <property name="mappingResources">
                  
          <list>
                      
          <value>resources/icustomer/Contact.hbm.xml</value>
                      
          <value>resources/icustomer/Customer.hbm.xml</value>
                  
          </list>
              
          </property>
          </bean>

          在web.xml文件中

          <context-param> 
                  
          <param-name>contextConfigLocation</param-name> 
                  
          <param-value>
                      /WEB-INF/applicationContext.xml,
                      /WEB-INF/classes/adm/infoportal/user/applicationContext-user.xml,
                  
          </param-value> 
          </context-param>

          這樣就編譯能通過了

          主站蜘蛛池模板: SHOW| 济阳县| 招远市| 邳州市| 绥滨县| 黄浦区| 江北区| 嘉善县| 静宁县| 濮阳县| 永年县| 米泉市| 政和县| 三原县| 鄱阳县| 南溪县| 平武县| 北票市| 永嘉县| 密山市| 南城县| 都昌县| 东海县| 东台市| 偏关县| 彭水| 务川| 重庆市| 海南省| 木兰县| 大同市| 杭锦旗| 河津市| 贵阳市| 讷河市| 南康市| 尼木县| 禹州市| 包头市| 泰兴市| 贵定县|