spring @Transactional
来源:互联网 发布:知牛财经 编辑:程序博客网 时间:2024/06/16 23:44
If no rules are relevant to the exception, it will be treated like DefaultTransactionAttribute
(rolling back on runtime exceptions).
如果光光注解 @Transactional 那么只会对运行时异常的回滚有效比如nullpointexception,而不会对非运行时异常有效比如io exception
Errors也会导致事务回滚
noRollbackFor 方法对throwable的子类进行不回滚处理配置
rollbackFor 为throwable的子类增加回滚处理配置
MyBatis自动参与到spring事务管理中,无需额外配置,只要org.mybatis.spring.SqlSessionFactoryBean引用的数据源与DataSourceTransactionManager引用的数据源一致即可,否则事务管理会不起作用。
PROPAGATION_REQUIRED, readOnly 事务为如果当前有事务就用这个事务,如果没有 就新建一个。并且为只读
一般用于查询事务
0 0
- Spring @Transactional
- spring @Transactional
- Spring @Transactional
- Spring @Transactional
- 【Spring @Transactional】
- Spring @Transactional
- Spring @Transactional
- Spring @Transactional
- Spring @Transactional
- Spring @Transactional
- Spring @Transactional
- Spring @Transactional
- Spring @Transactional
- Spring @Transactional
- spring @Transactional
- Spring @Transactional
- Spring @Transactional
- Spring @Transactional
- HDU-3870-Catch the Theves
- PHP开发小技巧⑧—CURL请求
- Git stash
- AppStore商店App的相关信息的获取
- C++小知识
- spring @Transactional
- 百度地图Javascript Api定位
- oracle 切割字符按串完成列转行
- 什么是I帧以及如何判断I帧
- win7下vs2010编译生成sqlite3.dll库
- PHP 入门指导(一)
- 初学者--如何正确的构建一个网页模板----在路上(5)
- Android原生软件里嵌入一个基于cordova的网页页面(webview)
- Java double 相乘的小问题记录