heting

            BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
            40 隨筆 :: 9 文章 :: 45 評(píng)論 :: 0 Trackbacks
          <?xml version="1.0" encoding="UTF-8"?>
          <beans xmlns="http://www.springframework.org/schema/beans"
                      xmlns:xsi
          ="http://www.w3.org/2001/XMLSchema-instance"
                      xmlns:aop
          ="http://www.springframework.org/schema/aop"
                      xmlns:tx
          ="http://www.springframework.org/schema/tx"
                      xsi:schemaLocation
          ="
                              http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
                              http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd
                              http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd"
          >
                              
          <bean id="sessionFactory"
                  class
          ="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
                  
          <property name="configLocation"
                      value
          ="classpath:hibernate.cfg.xml">
                  
          </property>
                  
          <property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"></property>
              
          </bean>
              
          <bean id="productDao" class="dao.impl.HIbernateProductDaoImpl">
                  
          <property name="sessionFactory" ref="sessionFactory"></property>
              
          </bean>
              
          <bean id="facade" class="facade.Facade">
                  
          <property name="productDao" ref="productDao"></property>
              
          </bean>
              
          <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
                  
          <property name="sessionFactory" ref="sessionFactory"></property>
              
          </bean>
              
              
          <tx:advice id="MethodAdivice" transaction-manager="transactionManager">
                  
          <tx:attributes>
                      
          <tx:method name="selete" read-only="true"/>
                      
          <tx:method name="*" />
                  
          </tx:attributes>
              
          </tx:advice>
              
          <aop:config>
                  
          <aop:pointcut id="aoppoint" expression="execution (* facade.*.*(..))"/>
                  
          <aop:advisor advice-ref="MethodAdivice" pointcut-ref="aoppoint"/>
              
              
          </aop:config>
              
          <bean id="make" class="action.make">
                  
          <property name="facade" ref="facade"></property>
              
          </bean>
              
              
              
              
          </beans>
          posted on 2008-09-17 22:54 賀挺 閱讀(118) 評(píng)論(0)  編輯  收藏

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


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 连平县| 洛扎县| 安塞县| 田阳县| 翁源县| 仁化县| 冷水江市| 应城市| 南康市| 峡江县| 侯马市| 巴青县| 伊春市| 曲水县| 驻马店市| 房产| 沂源县| 开原市| 河源市| 石城县| 桐柏县| 石屏县| 麦盖提县| 安乡县| 桐梓县| 肃北| 辽中县| 闽侯县| 伊川县| 宜昌市| 南川市| 咸丰县| 漳平市| 龙南县| 闻喜县| 秀山| 揭西县| 怀远县| 稷山县| 察隅县| 洛宁县|