Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
maoqingcode opened this issue Nov 5, 2020 · 0 comments
Open

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

maoqingcode opened this issue Nov 5, 2020 · 0 comments

Comments

@maoqingcode
Copy link

maoqingcode commented Nov 5, 2020

单元测试会自动回滚 添加@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));
    }
@maoqingcode maoqingcode changed the title chapter3-10:使用单元测试 执行成为也会回滚 chapter3-10:使用单元测试 执行成功也会回滚 Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant