Last active
November 27, 2018 15:43
-
-
Save CristianoPassos/00162da90aaf1ccde3750257cc111ed0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
public class UserManagementService { | |
@Autowired | |
private UserService userService; | |
public void processUser(User user) { | |
userService.processAndSave(user); | |
} | |
} | |
@Service | |
public class UserService { | |
//Methods, Fields | |
public void processAndSave(User user) { | |
//Do something | |
saveUser(user); | |
} | |
@Transactional | |
public void saveUser(User user) { | |
//Saving user here | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment