# 채연님 수업
# 공지사항
- Realworld
- [Todo list 만들기는 이제 그만, 우아한 형제](https://techblog.woowahan.com/2672/)
- [API 스펙](https://realworld-docs.netlify.app/docs/specs/backend-specs/introduction)
- [데모페이지](https://demo.realworld.io/#/)
- 추천 강의
- [최범균, JPA 기초](https://youtube.com/playlist?list=PLwouWTPuIjUi9Sih9mEci4Rqhz1VqiQXX)
- [김영한, 스프링 입문](https://www.youtube.com/watch?v=qyGjLVQ0Hog&list=PLumVmq_uRGHgBrimIp2-7MCnoPUskVMnd)
- 20회차 프로젝트 종료
- 22회차 포트폴리오
- 18 19 20: 프로젝트 진행
- 21 22: 포트폴리오, 이력서, 면접
- 18회차 5회 분량의 입금
# 20230620 18 회차 (1시간 수업)
## 과제
- Delete Comment (댓글 삭제)
- Get Comments from an Article (댓글 가져오기)
- Unfollow user (언팔로우)
# 20230613 17 회차 (1시간 수업)
## 과제
- Unfollow user (언팔로우)
- Add Comments to an Article (댓글 남기기)
- Get Comments from an Article (댓글 가져오기)
- Delete Comment (댓글 삭제)
# 20230606 16회차 (1시간 수업)
## 과제
- 포스트맨 테스트 -> 코드 분석 -> PR 리뷰
- https://github.com/CHyeony/project_202303/pull/33
- https://github.com/CHyeony/project_202303/pull/34
- Unfollow user (언팔로우)
- Add Comments to an Article (댓글 남기기)
- Get Comments from an Article (댓글 가져오기)
- Delete Comment (댓글 삭제)
# 20230517 15회차
## 과제
- 포스트맨으로 좋아요 여부, 좋아요 개수 조회 api 테스트 후 머지 (https://github.com/CHyeony/project_202303/pull/24)
- api 별로 이슈 만들기
- api
- Get Profile (프로필 조회 api)
- Follow user (팔로우)
- Unfollow user (언팔로우)
- Add Comments to an Article (댓글 남기기)
- Get Comments from an Article (댓글 가져오기)
- Delete Comment (댓글 삭제)
- 생활코딩 git 충돌 해결하기 시청 (https://opentutorials.org/course/4587/29485)
- JPA 서적 7, 8장
## 남은 api 목록
- Get Profile
- Follow user
- Unfollow user
- Add Comments to an Article
- Get Comments from an Article
- Delete Comment
- List Articles
- Feed Articles
- Get Tags
# 20230502 14회차
## 과제
- 게시글 좋아요, 좋아요 취소
- api 테스트하기
- 이해하고 머지하기
- 좋아요 개수, 여부 반환(https://github.com/CHyeony/project_202303/issues/22)
- 충돌나는 브랜치 충돌 해결하고 마스터에 머지하기 (https://github.com/CHyeony/project_202303/pull/18)
- 머지 순서는 18번 pr -> 23번 pr
- JPA 5,6장
# 20230425 13.5회차
- 마음 다잡기
- 정처기
- 목표하는 곳
- 집에서 멀지 않은 곳 (수원 인계동)
- 업무적으로 원하는 것?
- https://jojoldu.tistory.com/278?category=689637
- https://jojoldu.tistory.com/279?category=689637
- 코드 짜보기
- https://www.inflearn.com/course/java-codesquad#
- 프로젝트 일정 기한: ~ 2023-05-16
# 20230418 13회차
## TODO
- 게시글 수정, 삭제 API
## 과제
- 게시글 slug 조회 API 피드백 수용
- 게시글 수정 API 코드 이해하고 머지하기 (https://github.com/CHyeony/project_202303/pull/19)
- 게시글 좋아요, 좋아요 취소(https://github.com/CHyeony/project_202303/issues/21)
- 좋아요 개수, 여부 반환(https://github.com/CHyeony/project_202303/issues/22)
- JPA 서적 6장
# 20230411 12회차
- ChatGPT 번역기 - 프롬프트 지니(https://chrome.google.com/webstore/detail/chatgpt-for-google-no-ads/elnanopkpogbhmgppdoapkjlfigecncf?hl=ko)
- 프로그래머스 (https://school.programmers.co.kr/learn/challenges?order=recent)
## 과제
- 사용자 수정 API 코드 이해 (https://github.com/CHyeony/project_202303/pull/16)
- 게시글 생성 API 코드 이해 (https://github.com/CHyeony/project_202303/pull/17)
- 게시글 조회 API 개발
- JPA 서적 4장, 5장
# 20230404 11회차
- 커밋 컨벤션 https://github.com/dungsil/TIL/blob/master/git/190506__%EC%9C%A0%EB%8B%A4%EC%8B%9C%ED%8B%B0_%EC%BB%A4%EB%B0%8B%EB%A9%94%EC%8B%9C%EC%A7%80_%EC%8A%A4%ED%83%80%EC%9D%BC%EA%B0%80%EC%9D%B4%EB%93%9C.md
## 과제
- 사용자 수정 API 코드 이해하고 머지하기
(추가로 코드를 작성해도 됨 예를 들어 테스트 코드)
- 게시글 생성 API
(feature/13-create-article 브랜치 이어서 작업하면 됨)
- 게시글 조회 API
- JPA 서적 3장
## TODO
- 사용자 정보 변경 API 구현(https://github.com/CHyeony/project_202303/issues/5)
# 20230328 10회차
## 과제
- 9회차 과제와 동일함
- JPA 서적 4장
# 20230314 9회차
## 과제
- 로그인 API 구현 (https://github.com/CHyeony/project_202303/issues/1)
- 로그인한 사용자 조회 API 구현 (https://github.com/CHyeony/project_202303/issues/4)
- 사용자 정보 변경 API 구현(https://github.com/CHyeony/project_202303/issues/5)
- Tip
- 사용자 조회 API, 정보 변경 API -> 로그인한 상태에서만 호출 가능함
- 로그인한 상태를 어떻게 알 수 있죠?
- Authorization: Token {userAccountId}
- Token 1
- Token 2
# 20230308 8회차
## 과제
- JPA 서적 3장까지 (자유)
- Git 강의 수강 (자유)
- https://opentutorials.org/course/3840
- Entity, Repository 생성 PR 작성 (이슈 따로 만들어주세요.) (필수)
- article entity
- API 스펙을 잘 파악해서 구현해야 함
- JPA 서적도 많이 참고하시길...
# 20230301 7회차
## 프로젝트
- Realworld
- [Todo list 만들기는 이제 그만, 우아한 형제](https://techblog.woowahan.com/2672/)
- [API 스펙](https://realworld-docs.netlify.app/docs/specs/backend-specs/introduction)
- [데모페이지](https://demo.realworld.io/#/)
- 과제
- ~ 3월 7일 과제
- start.spring.io
- gradle
- Spring Boot 2.x 버전대로 사용
- Java 8
- Spring Web
- Spring Data JPA
- H2
- Lombok
- Git 강의 수강
- https://opentutorials.org/module/3733
- https://opentutorials.org/course/3839
- 본인 GitHub에 프로젝트 업로드
- JPA 서적 1장까지
- 모르면 질문하기 꼭...ㅋㅋㅋㅋㅋㅋㅋㅋ
- ERD (같이...)
- user
- follow
- article
- comment
- favorite_article
- article_tag
## JPA 서적
- http://www.yes24.com/Product/Goods/19040233
## 연관관계
- 양방향: Member <-> Team
- Member.getTeam(): Team \@ManyToOne
- Team.getMembers(): List\<Member\> \@OneToMany
- 단방향: Member -> Team O, Member <- Team X
- Member <- Team
- 선택은 자유. 양방향은 권장하지 않습니다.
- 일단은 단방향 매핑. 추후 필요하면 양방향 매핑.
- 연관관계의 종류
- ManyToOne
- OneToMany
- OneToOne: 양방향 가능. 이것도 웬만하면 단방향으로
- ManyToMany: 중간에 연관관계를 위한 테이블이 하나 있음
### ManyToMany 예시
- member
- member_id (PK)
- order
- member_id (FK)
- product_id (FK)
- order_id (PK)
- product
- product_id (PK)
## 영속성 컨텍스트
- 인메모리에서 엔티티를 관리하는 환경
- Transactional -> DB 트랜잭션 -> JPA 영속성 컨텍스트
- 엔티티
- New: 비영속
- Managed: 영속
- Detached: 준영속
- Removed: 삭제된 상태
- removed -> managed
- managed -> removed
- managed -> detached
- detached -> managed
- 엔티티 매니저 (EntityManager)