日期:2014-05-17 浏览次数:20728 次
<!-- 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>
![]()
推荐阅读更多>
- J2ME怎么解压带密码的zip包,已经知道密码
- servicemix集成activemq的有关问题
- Timestamp类型转换为DATE类型,该怎么解决
- 有没有用过Greenfoot的友人,求Greenfoot版的hello world例程
- action运行了两次解决思路
- REST与传统HTTP的关系
- 求哪位能告诉小弟我:在jsp中pdf财务文挡怎么转换成网页,转换后要版面文字和数字和原pdf文挡一致.
- SSH小异常求哈,Invalid action class configuration that references an unknown class
- Hibernate的session连接数量为啥会这么大
- 求JAVA EE 小项目,该怎么解决
- 请教怎样用java代码把calendar.getTimeInMillis()获得的毫秒时间转化为yyyy-MM-dd样式的时间
- 线程互斥-有点不懂,请问。
- 数组复制的有关问题
- tomcat启动时分报错java.lang.ClassCastException
- csdn只能记录登录状态1周了.解决办法
- 帮小弟我看看这句代码
- 为什么能编译通过?该如何解决
- 用jforum做论坛,请教jforum论坛采用的加密方式是什么啊
- 无法安装java运行环境,求解解决方法
- 哪位高手有64位JDK的地址啊 给个