Transactions, Spring.
transaction is not rolled back because the code throws a Checked Exception. public class UserService { @Autowired UserRespository userRepository; @Transactional public User getUser(String id) throws UserNotEligibleToDriveException{ User user = userRepository.get(id); user.setMobile("12345678");