spring学习笔记12----Spring+jdbc组合开发( 采用基于xml方式配置事务)
2013-05-09 18:47
866 查看
关于事务管理配置有两种方式:
(1)注解方式(可以参考我以前的文章)
/article/9198225.html
(2)xml配置事务管理
代码和注解方式中用到的一样!
精华在xml配置:
编程时遇到的问题解决:
遇到的异常:
http://blog.sina.com.cn/s/blog_904d1154010108cy.html
/article/4920774.html
/article/1811192.html
jar包下载
http://ishare.iask.sina.com.cn/download/explain.php?fileid=13433573
(1)注解方式(可以参考我以前的文章)
/article/9198225.html
(2)xml配置事务管理
代码和注解方式中用到的一样!
精华在xml配置:
<!-- 配置事务通知bean --> <tx:advice id="txAdvice" transaction-manager="txManager" > <tx:attributes> <!-- 使用通配符设置通知方法,将以get开头的方法,设置为不需要事务 --> <tx:method name="get*" read-only="true" propagation="NOT_SUPPORTED"/> <!-- 至于其他的使用默认的事务行为(默认隔离级别) --> <tx:method name="*"/> </tx:attributes> </tx:advice> <!-- xml配置aop --> <aop:config> <aop:pointcut id="transactionPointcut" expression="execution(* cn.itcast.service..*.*(..))"/> <!-- 设置拦截切入点--> <aop:advisor advice-ref="txAdvice" pointcut-ref="transactionPointcut"/> </aop:config>
编程时遇到的问题解决:
遇到的异常:
http://blog.sina.com.cn/s/blog_904d1154010108cy.html
/article/4920774.html
/article/1811192.html
jar包下载
http://ishare.iask.sina.com.cn/download/explain.php?fileid=13433573
相关文章推荐
- spring学习笔记10--Spring+jdbc组合开发(注解方式配置事务)
- Spring学习-22:Spring的AOP:基于AspectJ的XML配置方式开发
- SpringMVC经典系列-03基于Spring2.5采用XMl配置的方式进行项目开发---【LinusZhu】
- spring采用基于xml配置方式进行事务的处理
- spring学习笔记(24)——xml方式配置事务
- spring采用基于xml配置方式进行事务的处理
- Spring4 学习笔记(3)-Spring 基于 XML 的方式配置 Bean(供自己学习)
- Spring4 学习笔记(3)-Spring 基于 XML 的方式配置 Bean
- Spring 采用基于XML方式配置事务
- spring学习笔记(23)基于tx/aop配置切面增强事务
- Spring 学习笔记(5)—— 简化xml配置文件的配置方式
- Spring4学习笔记-AOP(基于配置文件的方式)
- spring学习笔记(12)——使用注解方式配置bean
- 20.Spring学习笔记_基于配置文件的方式来配置 AOP(by尚硅谷_佟刚)
- spring中Bean的xml方式配置学习笔记
- 采用基于XML方式配置事务
- SSM框架笔记07:初探Spring——采用XML配置文件与注解方式
- spring学习笔记(22)----基于配置文件的方式来配置AOP
- Spring 基于xml配置方式的事务
- Spring之AOP声明式事务管理(采用xml的配置方式更好)