美文网首页
SpringBoot 事务管理

SpringBoot 事务管理

作者: 氕氘氚_笔记 | 来源:发表于2018-07-31 16:51 被阅读0次

    启动类上加注解@EnableTransactionManagement,开启事务
    在方法上加注解@Transactional
    eg:

    @Override
    @Transactional(propagation = Propagation.REQUIRED,
                   isolation = Isolation.DEFAULT,
                   timeout=36000,rollbackFor=Exception.class)
    public void method( ) {
    }
    

    相关文章

      网友评论

          本文标题:SpringBoot 事务管理

          本文链接:https://www.haomeiwen.com/subject/limhvftx.html