最近开发过程中,因为Spring 声明式事物的不太了解,工作中被卡住了很长时间,
特别整理了关于Spring 的四种声明式事物的相关信息:
Spring中几种常见的事务配置,是Aop和Ioc的充分体现
以下两个bean的配置是下面要用到的。
<!-- 定义事务管理器(声明式的事务) -->
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory" />
</property>
</bean>
<!-- *******业务逻辑层(是对各个DAO层的正面封装)主要用到<<门面模式>>****** -->
<bean id="fundService"
class="com.jack.fund.service.serviceimpl.FundService">
<property name="operdao">
<ref bean="operatorDAO" />
</property>
<property name="producedao">
<ref bean="fundProduceDAO" />
</property>
<property name="customerdao">
<ref bean="customerDAO" />
</property>
<property name="accountdao">
<ref bean="accountDAO" />
</property>
<property name="fundaccountdao">
<ref bean="fundAccountDAO" />
</property>
<property name="fundtransdao">
<ref bean="