Repository navigation
[3단계 - Transaction 적용하기] 레디(최동근) 미션 제출합니다. - #836
Merged
Merged
Conversation
Chocochip101
requested changes
Oct 13, 2024
Chocochip101
left a comment
There was a problem hiding this comment.
빠르게 구현해주셨네요, 레디!
리뷰 남겼으니 확인 부탁드려요 😄
| user.changePassword(newPassword); | ||
| userDao.update(user); | ||
| userHistoryDao.log(new UserHistory(user, createBy)); | ||
| try (final Connection connection = dataSource.getConnection()) { |
There was a problem hiding this comment.
Datasource로부터 커넥션을 가져오는 로직을 UserService에서 제거해보는 것은 어떤가요?
Member
Author
There was a problem hiding this comment.
넵! UserService에서 커넥션을 가져오는 책임을 transactionManager에게 넘겨주었습니다..! 변경한 코드가 썩 마음에 들지는 않지만 4단계 때 더 발전시켜보겠습니닷 😃
| } | ||
|
|
||
| public long getId() { | ||
| public Long getId() { |
Member
Author
There was a problem hiding this comment.
현재 id의 타입은 Long으로 null이 허용되는데 getter의 리턴 타입이 long primitive 타입으로 되어있으면 이 메서드 호출시에 타입 캐스팅에 실패하여 NPE가 발생하게 되어 변경해주었습니다!
Comment on lines
+18
to
+20
| connection.setAutoCommit(false); | ||
| runnable.run(); | ||
| connection.commit(); |
There was a problem hiding this comment.
autoCommit을 다시 true로 설정할 필요는 없을까요?
Member
Author
There was a problem hiding this comment.
오오 맞네요..!!
setAutoCommit false 하기 전에 있던 autoCommit 값을 가져와 다시 원복 해주었습니다!
Chocochip101
approved these changes
Oct 14, 2024
Chocochip101
left a comment
There was a problem hiding this comment.
레디의 의견 잘 들었고, 피드백 빠르게 해주셨네요👍
4 단계까지 화이팅입니다🙌🏻
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
안녕하세요 초코칩!!
리팩터링하고 싶은 부분들이 많았지만 다음 단계로 미루고 구현에 집중하였습니다..!
이번 리뷰도 잘 부탁드립니다 :)