@Transactional(readOnly = false) public void blockUser(Long userId) { User user = userRepository.loadUserByUserId(userId); user.setEnabled(!user.isEnabled()); logger.info("Blocking " + user); userRepository.storeUser(user); }
@Transactional(readOnly = false) public void updateUser(User user) { logger.info("Saving " + user); userRepository.storeUser(user); }