隨筆 - 0  文章 - 0  trackbacks - 0
          <2025年6月>
          25262728293031
          1234567
          891011121314
          15161718192021
          22232425262728
          293012345

          vooctj@gmail.com

          留言簿

          文章分類(2)

          文章檔案(2)

          搜索

          •  

          最新評論

          applicationContext.xml
          <?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"
                 xmlns:context="http://www.springframework.org/schema/context"
                 xsi:schemaLocation="http://www.springframework.org/schema/beans
                                     http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                                     http://www.springframework.org/schema/aop 
                                     http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
                                     http://www.springframework.org/schema/context 
                                     http://www.springframework.org/schema/context/spring-context-2.5.xsd
                                     http://www.springframework.org/schema/tx 
                                     http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
          <!-- transactionManager -->
          <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
          <property name="sessionFactory">
          <ref bean="sessionFactory"/>
          </property>
          </bean>
          <!-- advice -->
          <tx:advice id="tx" transaction-manager="transactionManager">
          <tx:attributes>
          <tx:method name="save*"  isolation="DEFAULT" propagation="REQUIRED" read-only="false"/>
          </tx:attributes>
          </tx:advice>
          <!-- sessionFactory -->
          <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
          <property name="configLocation" value="classpath:hibernate/hibernate.cfg.xml">
          </property>
          </bean>
          <!-- aop  -->
          <aop:config>
          <aop:pointcut expression="execution(* com.vooctj.service.impl.*.*(..))" id="perfom"/>
          <aop:advisor advice-ref="tx" pointcut-ref="perfom"/>
          </aop:config>
          <!-- entity studentDAO -->
          <bean id="studentDAO" class="com.vooctj.dao.impl.StudentDAOImpl">
          <property name="sessionFactory">
          <ref bean="sessionFactory"/>
          </property>
          </bean>
          <!-- entity studentService-->
          <bean id="studentService" class="com.vooctj.service.impl.StudentServiceImpl">
          <property name="studentDAO">
          <ref bean="studentDAO"/>
          </property>
          </bean>
          </beans>


          Mail:vooctj[at]gmail.com
          Msn:voox[at]live.cn  
          Author:vooctj
          From:http://www.aygfsteel.com/vooctj

          posted on 2012-12-15 17:24 vooctj 閱讀(70) 評論(0)  編輯  收藏 所屬分類: J2EE

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


          網站導航:
           
          主站蜘蛛池模板: 疏附县| 民和| 万州区| 甘肃省| 台山市| 大城县| 岑溪市| 龙游县| 年辖:市辖区| 全椒县| 安塞县| 吴旗县| 旬邑县| 绵竹市| 綦江县| 凤庆县| 揭阳市| 长沙县| 汤阴县| 肥西县| 中宁县| 上栗县| 肃宁县| 永靖县| 南丹县| 辽宁省| 祥云县| 都昌县| 曲周县| 甘孜| 祁门县| 富顺县| 收藏| 偃师市| 开远市| 宁蒗| 固原市| 宽甸| 固安县| 安新县| 玉屏|