日期:2014-05-17 浏览次数:20819 次
<!-- 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>
![]()
推荐阅读更多>
- 有关SPRING+CXF的有关问题。跪求。
- jsp分页显示代码
- 如何给一个参数为数组的函数传递参数
- 怎么用java读取一个txt 文件内的内容并把它赋值与String里
- 判断输入的字符串,必须是日期,该如何处理
- java组播接收数据以致网络不通
- spring最简单的有关问题,sessionFactory无法注入
- 请教小弟我该去什么样的公司呢
- 这段代码哪里错了
- jsp连sql2000后的数据删除有关问题
- PDFBox将WORD文档转换PDF中的疑问,有人应用过吗,该如何处理
- 页面动态显示SQL动态字段查询出的数据,该如何处理
- jsp框架交互,怎么获得另一个页面的查询结果
- jsp写的网页,查询非常慢,tomca日志如下:该怎么解决
- 关于正则表达式的一个具体困惑解决办法
- 二年工作经验,面试时要求4500的工资,是不是过高了,java开发工程师,贵州的解决方法
- 请教eclipse能做javabean吗?小弟我是初学者
- java 第三方架包出错怎么处理
- 关于linux装配openoffice无法启动
- 简单的JSP标记有关问题~新手~求解