日期:2014-05-17 浏览次数:20879 次
<!-- TransactionManager --> <bean id="hibTransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <tx:advice id="txAdvice" transaction-manager="hibTransactionManager"> <tx:attributes> <tx:method name="add*" propagation="REQUIRED" /> <tx:method name="del*" propagation="REQUIRED" /> <tx:method name="update*" propagation="REQUIRED" /> <tx:method name="select*" propagation="REQUIRED"/> <tx:method name="search*" propagation="REQUIRED"/> <tx:method name="insert*" propagation="REQUIRED" /> <tx:method name="do*" propagation="REQUIRED" /> <tx:method name="*" propagation="SUPPORTS" read-only="true" /> </tx:attributes> </tx:advice> <aop:config> <aop:pointcut expression="execution(* biz.*.*(..))" id="bizMethods" /> <aop:advisor advice-ref="txAdvice" pointcut-ref="bizMethods" /> </aop:config> <!-- ********************************我是很长的分割线******************************** --> <!-- Dao --> <bean id="petDiaryDao" class="dao.impl.hib.PetDiaryDaoHibImpl"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <bean id="petInfoDao" class="dao.impl.hib.PetInfoDaoHibImpl"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <!-- ********************************我是很长的分割线******************************** --> <!-- Biz --> <bean id="petDiaryBizTarget" class="biz.impl.PetDiaryBizImpl"> <property name="petDiaryDao" ref="petDiaryDao" /> </bean> <bean id="petInfoBizTarget" class="impl.PetInfoBizImpl"> <property name="petInfoDao" ref="petInfoDao" /> </bean> <!-- ********************************我是很长的分割线******************************** --> <!-- Advice --> <bean id="lotteryAdvice" class="advice.LotteryAdvice"> <property name="petInfoBiz" ref="petInfoBizTarget" /> </bean> <bean id="petInfoBiz" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="proxyInterfaces" value="biz.PetInfoBiz" /> <property name="interceptorNames" value="lotteryAdvice" /> <property name="target" ref="petInfoBizTarget" /> </bean> <bean id="petDiaryBiz" class="org.springframework.aop.framework.ProxyFactoryBean"> <property name="ProxyInterfaces" value="biz.PetDiaryBiz" /> <property name="interceptorNames" value="lotteryAdvice" /> <property name="target" ref="petDiaryBizTarget" /> </bean>
![]()
推荐阅读更多>
- 一个关于线程的有关问题和手机性能的有关问题
- 本人现转手发售www.java-cn.com(新网代理)-JSP虚拟主机及域名
- javase有关问题,什么是数组、正则表达式及多态
- 数据库oralce 安装有关问题
- Quartz定时器,该如何处理
- 怎么在Struts结构中的Action中访问多个java bean
- |javamy|Java根据JavaBean的规则却要写成get,set,这样表字段多了看起来不明了,有什么解决办法?有.NET与Java代码比较 多谢
- 怎么降低CPU占用率
- Myeclipse9.0 不是自带的,其他的也配置好了,tomcat6.0启动不了,该如何解决
- 急求java实现sql server数据库的备份和还原~大哥哥大姐姐们快帮帮忙啊该怎么解决
- java web开发就业思忖
- 来看看,nokia sdk有关问题
- MyEclipse7.5+tomcate6+jdk1.5解决办法
- jsp怎么做组织架构图a
- 初学者,myeclipse 新建JSP时用NEW新建没有JSP每次都要点other输入JSP才找的到,有什么方法能让它出现在NEW里
- eclipse 新建applicationContext.xml资料
- 请教一个关于string的简单有关问题!
- java 中的LIST接口 报错解决方法
- struts2.3.16的ActionChainResult类提示异常,但是不影响工作
- 百思不得其解的一个socket有关问题