Created
December 21, 2025 03:59
-
-
Save msbaek/be34a512e4b2361f39d087b5f05e0cd1 to your computer and use it in GitHub Desktop.
userRepository
This file contains hidden or 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 void updateName(Long id, String newName) { | |
| User user = userRepository.findById(id).orElseThrow(); // 그냥 POJO | |
| user.setName(newName); | |
| userRepository.save(user); // 명시적. 호출 안 하면 아무 일도 없다. | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment