Created
January 8, 2020 13:59
-
-
Save trimoq/a5baa11b33e39f6c8425952590441ee0 to your computer and use it in GitHub Desktop.
UserService having the repository injected
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
public class UserService{ | |
@Autowired | |
private UserRepository userRepository; | |
public void addUser(String name){ | |
// do some business logic here | |
userRepository.addUser(name); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment