class UserService {

    @Transactional("slaveTransactionManager")
    public void inserUser(String username, String password) {
        User user = new User(username, password);
        userMapper.insert(user);
        School school = new School(username, password);
        schoolMapper.insert(school);
    }

}

class UserServiceTest  {

    @Autowired
    private UserService userService;

    @Test
    public void addSchool() {


        userService.inserUser("root2", "root2");
    }

}