Skip to content

chapter3-10:使用单元测试 执行成功也会回滚 #60

Description

@maoqingcode

单元测试会自动回滚 添加@Rollback(false)

@Transactional
    @Rollback(false)
    @Test
    public void test(){
        userRepository.save(new User("AAA", 10));
        userRepository.save(new User("BBB", 20));
        userRepository.save(new User("CCC", 30));
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions