-
Notifications
You must be signed in to change notification settings - Fork 20
[주연진] 웹 서버 7단계 - 이미지 업로드 구현 완료 #254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
github-actions
merged 23 commits into
softeerbootcamp-7th:yeonjinJoo
from
yeonjinJoo:WAS/stage7-3
Jan 19, 2026
Merged
[주연진] 웹 서버 7단계 - 이미지 업로드 구현 완료 #254
github-actions
merged 23 commits into
softeerbootcamp-7th:yeonjinJoo
from
yeonjinJoo:WAS/stage7-3
Jan 19, 2026
Conversation
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.
완료 작업 목록
TODO
주요 고민 사항과 해결 방안
문제 상황
기존에는 각 Repository 메서드마다
Connection을 직접 획득하고 해제하는 로직을 반복적으로 작성하고 있었다.이로 인해 Repository 코드에 커넥션 관리 코드가 섞이면서, 실제 DB 접근 로직의 가독성이 떨어지고 코드 길이가 불필요하게 길어지는 문제가 발생했다.
해결 방안
커넥션 관리 책임을 분리하기 위해
JdbcTx유틸 클래스를 도입했다. Functional Interface를 정의하고 람다를 활용해, Connection 획득·해제 및 예외 처리 로직을 공통화하고 Repository에서는 DB 접근 로직만 작성하도록 구조를 개선했다.이를 통해 Repository 코드에서 반복되던 보일러플레이트 코드를 제거하고, 관심사 분리가 명확한 구조로 리팩토링할 수 있었다.