Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
aab0c2f
feat: 코드 안내 따라 저장 방식에 파일별 lock 추가
Color-Marker Feb 19, 2026
1fc63ee
feat: 컨트롤러 uri REST 방식에 맞춰 수정 및 응답 방식 규격화
Color-Marker Feb 19, 2026
41cb6b4
feat: 일부 빠진 부분들 및 postman쪽 연결 부분 수정된 부분들 재확인
Color-Marker Feb 19, 2026
4308ff8
feat: 에러 부분과 이상한 작동 부분 확인하여 수정
Color-Marker Feb 19, 2026
ce56086
feat: swagger 적용 완료
Color-Marker Feb 19, 2026
b22bc8e
feat: 프론트 쪽과의 api 통일 및 필요 데이터 변수 이름 및 구조 등 수정
Color-Marker Feb 20, 2026
adaaa34
feat: 자잘한 수정
Color-Marker Feb 22, 2026
431767e
build: railway에서 자바 21이 아니라 17로 인식하도록 system.properties 추가
Color-Marker Feb 23, 2026
1751a81
build: railway가 system.properties 인식 못함. 다른 방법 시도 중
Color-Marker Feb 23, 2026
91854bf
build: build.gradle의 자바 툴체인 주석 처리
Color-Marker Feb 23, 2026
07b1e5c
build: 강사님이 올려주신 설정 적용 시도
Color-Marker Feb 23, 2026
8c83f08
build: application.yaml 수정
Color-Marker Feb 23, 2026
e223617
build: railway 위해 일부 수정 중..
Color-Marker Feb 23, 2026
02d0a7b
postman 결과 재작성 준비..
Color-Marker Feb 23, 2026
9a219b5
memo: 깃허브 폴더의 results 폴더에 postman 응답 결과 저장 완료
Color-Marker Feb 24, 2026
858859b
github: pr md 작성
Color-Marker Feb 28, 2026
d7a5336
build: db 설정 추가
Color-Marker Mar 4, 2026
9b74108
build: ddl 작성 완료
Color-Marker Mar 4, 2026
d500ae3
build: sql 로깅 설정 yaml에 추가
Color-Marker Mar 4, 2026
38f53ef
feat: 기본 엔티티 정의 및 상속
Color-Marker Mar 4, 2026
bb84121
feat: base 엔티티 클래스 강사님 코드 따라 수정
Color-Marker Mar 4, 2026
a3ef56e
memo: db 연관관계 매핑 정보 pr md에 정리
Color-Marker Mar 4, 2026
9a1f2a3
feat: 강사님 자료 따라 필요한 파일 생성 및 이름 변경
Color-Marker Mar 4, 2026
46c1d0a
feat: jpa 어노테이션으로 엔티티 작업
Color-Marker Mar 4, 2026
98021f0
feat: jpaRepository 형식으로 레포지토리 모두 전환 및 수정
Color-Marker Mar 4, 2026
7a4504d
feat: dto 정리 및 엔티티를 dto로 바꿔주는 mapper 작성
Color-Marker Mar 4, 2026
3e62e08
feat: service 레이어 수정
Color-Marker Mar 4, 2026
aa4764a
feat: postman 통한 기본적 작동 확인. binaryContentStorage 작업 시작
Color-Marker Mar 5, 2026
95f494a
feat: binaryContent 기능 완료
Color-Marker Mar 5, 2026
c8120af
feat: pageResponse dto와 mapper 추가
Color-Marker Mar 6, 2026
b50ebdb
feat: paging 정렬 추가
Color-Marker Mar 6, 2026
4c8712a
feat: 심화 읽기전용 트랜잭션 활용. mapper를 컨트롤러에서 서비스로 모두 이동시킴.
Color-Marker Mar 9, 2026
3287a99
feat: n+1 문제 해결 시도
Color-Marker Mar 9, 2026
5c1c029
feat: pr 피드백 적용 및 가입되어 있지 않은 유저가 channel 목록 보지 못하게 변경
Color-Marker Mar 9, 2026
e80f568
feat: 출력 방식 통일
Color-Marker Mar 9, 2026
649ed01
feat: mapStruct 잉요해 mapper 코드 단순화
Color-Marker Mar 9, 2026
15046b1
feat: 페이지네이션 cursor 방식으로 전환
Color-Marker Mar 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/PR_SPRINT_4.md

This file was deleted.

47 changes: 47 additions & 0 deletions .github/PR_SPRINT_6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## 요구사항

### 기본

- 전부 완료

### 심화

- 전부 완료

## 관계 매핑 정보

| 엔티티 관계 | 다중성 | 방향성 | 부모-자식 관계 | 연관관계의 주인 |
|:---------------------------|:----|:----------------------------|:----------------------------------|:-----------|
| User : BianaryContent | 1:1 | User -> BinaryContent | 부모: BinaryContent, 자식: User | User |
| User : UserStatus | 1:1 | UserStatus -> User | 부모: User, 자식: UserStatus | UserStatus |
| Channel : ReadStatus | 1:N | ReadStatus -> Channel | 부모: Channel, 자식: ReadStatus | ReadStatus |
| User : ReadStatus | 1:N | ReadStatus -> User | 부모: User, 자식: ReadStatus | ReadStatus |
| Channel : Message | 1:N | Message -> Channel | 부모: Channel, 자식: Message | Message |
| User : Message | 1:N | Message -> User | 부모: User, 자식: Message | Message |
| BinaryContent : Attachment | 1:N | Attachment -> BinaryContent | 부모: BinaryContent, 자식: Attachment | Attachment |
| Message : Attachment | 1:N | Attachment -> Message | 부모: Message, 자식: Attachment | Attachment |

## 오프셋 페이지네이션 vs. 커서 페이지네이션

일단 페이지네이션이라고 하면, 특정 정렬 기준과 필요 개수 조건에 맞춰 데이터를 가져오는 것이다.
기본 부분에서는 slice를 이용한 오프셋 페이지네이션을 이용하고,
심화 부분에서는 프론트에 cursor 관련 변수가 추가되어 커서 페이지네이션을 이용하게 리팩토링한다.

| 오프셋 | 커서 |
|:-------------------------------------------|:--------------------------------------------------------------------------------|
| 페이지 단위로 구분하여 요청/응답하게 구현하는 방식 | 클라이언트가 가져간 마지막 row의 순서상 다음 row들을 n개 요청/응답하게 구현 |
| 쉽게 말해 무조건 내부에서 미리 결정되어 있는 단위를 기준으로 잘라서 보내줌 | 보낸 데이터의 다음 데이터부터 보내주기 위한 구현이 되어있음. 그래서 어디서부터 보내줘야 하는지를 나타내는 지표로 cursor를 이용하는 방식 |
| 무조건 정해진 크기로 잘라서 보내줌 | 여기 다음부터 몇 개 주세요가 가능 -> 무한 스크롤 기능 구현 가능! |
| 정해진 크기로 보내면 되니 구현이 간단함 | cursor가 어딘지 확인해서 그 다음부터 n개 보내줘야 해서 오프셋 방식보다는 복잡함 |

## 주요 변경사항

- n+1 문제를 해결하기 위해 메시지 조회 시 entityGraph에 attachments도 원래 추가해두었으나, attachments가 리스트 형식이다 보니 쿼리 길이가 너무
길어지는 상황이 발생함.
- 이에 이를 해결하기 위해 entityGraph에서 attachments는 제외하고 yaml에 batch 사이즈를 설정하는 방식으로 전환.
- batch 크기는 페이지네이션 사이즈인 50으로 같게 설정.

## 멘토에게

- n+1 문제가 전부 잘 해결된 것인지 궁금합니다.
- 또한 페이지네이션 방식 중 페이지 방식을 이용할 때 오프셋 형식을 이용하고, slice를 이용할 시 커서 방식을 이용하면 되는 건지 궁금합니다.
1 change: 1 addition & 0 deletions .github/results/auth-login.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"username":"admin","email":"admin@codeit.com","password":"admin","profileId":null,"id":"93c7cf76-8922-432f-a370-3155bc6d514e","createdAt":"2026-02-24T04:26:52.043145100Z","updatedAt":null}
1 change: 1 addition & 0 deletions .github/results/binarycontent-find.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .github/results/binarycontent-findsome.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .github/results/channel-delete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
channel: bf1cbe9f-0d08-461c-819c-007c95d02b80가 삭제되었습니다.
1 change: 1 addition & 0 deletions .github/results/channel-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"id":"75afedfc-3c08-41be-99fd-96344f35e015","type":"PRIVATE","name":"privateChannel","description":"This is private channel","participantIds":["93c7cf76-8922-432f-a370-3155bc6d514e"],"lastMessageAt":"-1000000000-01-01T00:00:00Z"}]
1 change: 1 addition & 0 deletions .github/results/channel-privateCreate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"75afedfc-3c08-41be-99fd-96344f35e015","type":"PRIVATE","name":"privateChannel","description":"This is private channel","participantIds":["93c7cf76-8922-432f-a370-3155bc6d514e"],"lastMessageAt":"-1000000000-01-01T00:00:00Z"}
1 change: 1 addition & 0 deletions .github/results/channel-publicEdit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"bf1cbe9f-0d08-461c-819c-007c95d02b80","type":"PUBLIC","name":"publicChannel1","description":"This is public channel1!","participantIds":[],"lastMessageAt":"-1000000000-01-01T00:00:00Z"}
1 change: 1 addition & 0 deletions .github/results/channle-publicCreate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"bf1cbe9f-0d08-461c-819c-007c95d02b80","type":"PUBLIC","name":"publicweeeeeeee","description":"This is public channel","participantIds":[],"lastMessageAt":"-1000000000-01-01T00:00:00Z"}
1 change: 1 addition & 0 deletions .github/results/message-create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"content":"hello","channelId":"75afedfc-3c08-41be-99fd-96344f35e015","authorId":"93c7cf76-8922-432f-a370-3155bc6d514e","attachmentIds":[],"id":"b5b412a0-be89-41ea-82cf-82f47fc0f931","createdAt":"2026-02-24T04:35:50.953493600Z","updatedAt":null}
1 change: 1 addition & 0 deletions .github/results/message-delete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
message: b5b412a0-be89-41ea-82cf-82f47fc0f931가 삭제되었습니다.
1 change: 1 addition & 0 deletions .github/results/message-edit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"content":"HAHAHAHAH!","channelId":"75afedfc-3c08-41be-99fd-96344f35e015","authorId":"93c7cf76-8922-432f-a370-3155bc6d514e","attachmentIds":[],"id":"b5b412a0-be89-41ea-82cf-82f47fc0f931","createdAt":"2026-02-24T04:35:50.953493600Z","updatedAt":"2026-02-24T04:36:16.000585300Z"}
1 change: 1 addition & 0 deletions .github/results/message-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"content":"HAHAHAHAH!","channelId":"75afedfc-3c08-41be-99fd-96344f35e015","authorId":"93c7cf76-8922-432f-a370-3155bc6d514e","attachmentIds":[],"id":"b5b412a0-be89-41ea-82cf-82f47fc0f931","createdAt":"2026-02-24T04:35:50.953493600Z","updatedAt":"2026-02-24T04:36:16.000585300Z"}]
1 change: 1 addition & 0 deletions .github/results/readstatus-create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"userId":"66f41570-572c-4c28-b20a-29ca30b59bbd","channelId":"66796913-b4ca-423d-8eb4-0d7e2a1e01bc","lastReadAt":"2026-02-24T04:38:53.533Z","id":"5b0aa85e-761a-43e7-8fe9-36079b337ccc","createdAt":"2026-02-24T04:38:53.592811900Z","updatedAt":"2026-02-24T04:38:53.592811900Z"}
1 change: 1 addition & 0 deletions .github/results/readstatus-edit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"userId":"66f41570-572c-4c28-b20a-29ca30b59bbd","channelId":"66796913-b4ca-423d-8eb4-0d7e2a1e01bc","lastReadAt":"2026-02-24T04:38:53.533Z","id":"5b0aa85e-761a-43e7-8fe9-36079b337ccc","createdAt":"2026-02-24T04:38:53.592811900Z","updatedAt":"2026-02-24T04:38:53.592811900Z"}
1 change: 1 addition & 0 deletions .github/results/readstatus-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"userId":"66f41570-572c-4c28-b20a-29ca30b59bbd","channelId":"66796913-b4ca-423d-8eb4-0d7e2a1e01bc","lastReadAt":"2026-02-24T04:38:53.533Z","id":"5b0aa85e-761a-43e7-8fe9-36079b337ccc","createdAt":"2026-02-24T04:38:53.592811900Z","updatedAt":"2026-02-24T04:38:53.592811900Z"}]
1 change: 1 addition & 0 deletions .github/results/user-create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"93c7cf76-8922-432f-a370-3155bc6d514e","createdAt":"2026-02-24T04:26:52.043145100Z","updatedAt":null,"username":"admin","email":"admin@codeit.com","profileId":null,"online":true}
1 change: 1 addition & 0 deletions .github/results/user-delete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
user: 6839afed-0409-4274-bfc5-228d311861f0가 삭제되었습니다.
1 change: 1 addition & 0 deletions .github/results/user-edit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"id":"6839afed-0409-4274-bfc5-228d311861f0","createdAt":"2026-02-24T04:29:46.273757100Z","updatedAt":null,"username":"guest","email":"guest@codeit.com","profileId":"6ce72bbf-51a0-4bb2-8c2d-212fb3cdf2f3","online":true}
1 change: 1 addition & 0 deletions .github/results/user-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"id":"6839afed-0409-4274-bfc5-228d311861f0","createdAt":"2026-02-24T04:29:46.273757100Z","updatedAt":null,"username":"guest","email":"guest@codeit.com","profileId":"6ce72bbf-51a0-4bb2-8c2d-212fb3cdf2f3","online":true},{"id":"93c7cf76-8922-432f-a370-3155bc6d514e","createdAt":"2026-02-24T04:26:52.043145100Z","updatedAt":null,"username":"admin","email":"admin@codeit.com","profileId":null,"online":true}]
1 change: 1 addition & 0 deletions .github/results/user-updateUserStatus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"userId":"6839afed-0409-4274-bfc5-228d311861f0","lastActiveAt":"2026-02-24T04:32:25.768697600Z","id":"74e550e0-94e9-4b73-8201-15f40084120e","createdAt":"2026-02-24T04:29:46.274766700Z","updatedAt":"2026-02-24T04:32:25.771715500Z","online":true}
Loading