@Test public void testInsert2User() { User user = new User(); user.setName("wjj"); userService.insert2(user); }
@Transactional(propagation = Propagation.REQUIRED) public void insert2(User user) { userDao.insertUser(user); queryUserById(1); userService3.queryUserById(1); }
UserService { @Transactional(propagation = Propagation.REQUIRED) public void insert2(User user) { userDao.insertUser(user); queryUserById(1); userService3.queryUserById(1); } }
UserService { @Transactional(propagation = Propagation.REQUIRED) public void insert2(User user) { userDao.insertUser(user); queryUserById(1); userService3.queryUserById(1); }  }
UserService { @Transactional(propagation = Propagation.REQUIRED) public void insert2(User user) { userDao.insertUser(user); queryUserById(1); userService3.queryUserById(1); }  User getUserById(long id); void insert(User user); @Transactional(propagation = Propagation.REQUIRED) void insert2(User user); @Transactional(propagation = Propagation.REQUIRES_NEW) User queryUserById(long id); List<User> queryByName(String nameLike); }
UserService { @Transactional(propagation = Propagation.REQUIRED) public void insert2(User user) { userDao.insertUser(user); queryUserById(1); userService3.queryUserById(1); }  User getUserById(long id); void insert(User user); @Transactional(propagation = Propagation.REQUIRED) void insert2(User user); @Transactional(propagation = Propagation.REQUIRES_NEW) User queryUserById(long id); List<User> queryByName(String nameLike);  }