spring事务模板使用
来源:互联网 发布:php datetime 时区 编辑:程序博客网 时间:2024/06/13 15:17
1.配置spring事务模板bean
<!--spring 模板事务-->
<bean id="transactionProxy" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager" ref="TransactionManager" />
<property name="transactionAttributes">
<props>
*****
</props>
</property>
</bean>
2.事务服务bean的配置
<bean id="xxxxDAO" class="com.xxxx.xxxxDAOImpl">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="xxxxServiceTarget" class="com.xxxx.xxxxServiceImpl" parent="service">
<property name="xxxxDAO" ref="xxxxDAO" />
</bean>
<bean id="xxxxService" parent="transactionProxy">
<property name="target" ref="xxxxServiceTarget" />
</bean>
使用占位符配置bean的方法:
<bean id="placeholderConfig"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>
***.properties
</value>
<value>
***.properties
</value>
</list>
</property>
</bean>
- spring事务模板使用
- spring事务模板使用
- 学习spring事务模板
- Spring 中的TransactionTemplate事务模板
- Spring Transaction template 事务模板
- 使用Spring管理事务
- Spring事务使用场景
- 事务模板接入(spring的编程式事务)
- 使用Spring的事务注解管理事务
- spring模板的使用
- DWR 使用Spring 管理事务
- spring使用编程式事务
- spring JDBC事务使用经验
- spring事务的配置使用
- spring使用TransactionProxyFactoryBean配置事务
- 使用SPRING+HIBERNATE 控制事务
- Spring Boot 事务的使用
- Spring 声明式事务使用
- C++阶段小结
- android获取连接到手机热点上的设备的信息
- 2013年新的开始,每周至少要写一篇博客!
- 遍历查询ldap服务器用户
- spring定时器分析
- spring事务模板使用
- jms在jboss上的简单应用
- install SWIG for OSX(10.8.2)
- spring调用存储过程
- 数据库分区表的使用
- hibernate 三种查询方式源码跟踪及总结
- 开发团队如何完成一个项目?
- 使用native 查询时,对特殊字符的处理。
- ubuntu 上samba创建共享组目录