日期:2014-05-17 浏览次数:20790 次
<!-- 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>
![]()
推荐阅读更多>
- 求JavaMail的jar包!解决方案
- 小女子请大家指点一二,该如何解决
- 在类里定义一个成员变量 private Demo d =new Demo() 跟private Demo=null有啥区别
- 用pl/sql怎么连上oracle服务器
- <jsp:useBean></jsp:useBean>解决办法
- 没有用spring的时候应该怎么管理实例
- 新手弱智有关问题,
- 验证ipv4,ipv6,FQDN的方法
- 大哥大姐一个简单的有关问题,进来指导一下小弟吧
- JSF.pages请求所需URL方式
- java MD5 加密什么个意思?好没水准的有关问题啊
- Ibatis 查询语句配置 (语句已有,求解如何配到xml里面)
- 怎么让elcipse 可以看到 jdk的源码呢
- 获取HTML源码文档中<div class="stat stat_area"></div>格式中的内容,该怎么解决
- 大伙出手试试 “做一个文本输入框和一个按钮!”(系统只让给10分,见谅!)
- 效率与简要书写之争,求解释
- html+jsp+jquery 这样的前端架构有什么样的优缺点啊适合大型局域网的网站架构么?安全性能怎么
- 对CSDN 大失所望+绝望
- 马士兵教程,该如何处理
- 求高手解析:org.apache.commons.httpclient.NoHttpResponseException,该如何解决