Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
34 changes: 34 additions & 0 deletions week09/keyword/keyword.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# WEEK 9 - 제이/한종서

## 핵심 키워드

### 객체 그래프 탐색

#### 객체 그래프란?

객체들이 서로 연관관계를 가지며 연결된 구조를 의미한다.

예를 들면, Store 하나에 Review 여러 개(*)가 달릴 수 있는데 이렇게 객체들이 서로 참조하고 연결되면서 하나의 **그래프** 구조를 이루고, 이를 객체 그래프라고 할 수 있다.

#### 객체 그래프 탐색

이러한 객체 그래프에서, 엔티티의 연관 필드를 따라가며 객체를 계속 조회하는 것을 말한다.

```java
Review review = ~;

String storeName = review.getStore().getName();
String reviewerName = review.getMember().getName();
```

이런 코드를 생각해보자.

`review.getStore()`, `review.getMember()` 처럼 연관된 객체를 따라가는 것이 바로 객체 그래프 탐색이다.

이러한 객체 그래프 탐색은 신경 쓸 필요가 있다.

스프링 JPA에서는 연관된 객체에 접근하는 순간 실제로 DB 쿼리가 나갈 수 있기 때문이다.

위 예에서, 리뷰만 조회한 줄 알았으나 Store가 LAZY 로딩인 경우 Hibernate가 뒤에서 store 조회 쿼리를 추가로 실행할 것이다.

따라서 성능 최적화, N + 1 문제 방지 등을 신경 쓸 때 이러한 상황을 잘 이해할 필요가 있다.
33 changes: 33 additions & 0 deletions week09/mission/mission.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# WEEK 9 - 제이/한종서

## 미션

### 본문

1. 내가 작성한 리뷰 목록 조회 API 구현하기

JWT 도입 후 API 리팩토링을 진행하면 좋을 것 같다.

![Image](/week09/mission/mission_1.png)

![Image](/week09/mission/mission_2.png)

[1번 미션 커밋 보러가기](https://github.com/dosp74/demo/commit/aeb61312cbd9a25a7d9b9d39370a17581b614fee)

2. 특정 가게의 미션 목록 조회 API 구현하기

![Image](/week09/mission/mission_3.png)

![Image](/week09/mission/mission_4.png)

[2번 미션 커밋 보러가기](https://github.com/dosp74/demo/commit/f972c8d8077d752ac77ec16d0b368833d689cc62)

3. 내가 진행 중인 미션 목록 조회 API 구현하기

![Image](/week09/mission/mission_5.png)

![Image](/week09/mission/mission_6.png)

[3번 미션 커밋 보러가기](https://github.com/dosp74/demo/commit/d27809eeaa9ad7c2a58acdf62ba3387d81a7050f)

[미션 레포지토리](https://github.com/dosp74/demo/tree/feature/chapter9)
Binary file added week09/mission/mission_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week09/mission/mission_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week09/mission/mission_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week09/mission/mission_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week09/mission/mission_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added week09/mission/mission_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.