Skip to content
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

데이터베이스 접근 로직 테스트 정의 #9

Closed
3 tasks done
llighter opened this issue Sep 30, 2023 · 1 comment · Fixed by #10
Closed
3 tasks done

데이터베이스 접근 로직 테스트 정의 #9

llighter opened this issue Sep 30, 2023 · 1 comment · Fixed by #10
Assignees
Labels
enhancement New feature or request

Comments

@llighter
Copy link
Owner

llighter commented Sep 30, 2023

도메인 설계 내용(#7)을 바탕으로 DB와 연동하기 위한 방법을 구상하고, 세팅하고, 테스트를 먼저 작성해본다.

  • DB 기술 선택하기
  • DB에 접근할 수 있는 상태로 환경 세팅하기
  • 테스트
@llighter llighter self-assigned this Sep 30, 2023
@llighter
Copy link
Owner Author

MYSQL을 선택하기로 함

@llighter llighter added the enhancement New feature or request label Sep 30, 2023
llighter added a commit that referenced this issue Sep 30, 2023
Spring boot 의존성에 DB와 JPA 사용할 수 있도록 의존성 추가
llighter added a commit that referenced this issue Sep 30, 2023
* Jpa auditing 기능을 쓰기 위해 `JpaConfig` 추가
* db 접근과 개발 편의를 위한 각종 부트 프로퍼티 적용
* TODO: 패스워드를 프로퍼티에 노출시켰다. 처리 필요
llighter added a commit that referenced this issue Sep 30, 2023
1 도메인 클래스 == 1 테이블 매칭되도록 설계했다.
생성자와 `equals()`, `hashcode()`등이 도메인 맥락에 맞게끔 디테일하게 설정함
llighter added a commit that referenced this issue Sep 30, 2023
이걸로 DB에 접근
llighter added a commit that referenced this issue Sep 30, 2023
기본 crud + 연관관계 매핑과 cscading이 잘 동작하는지 보려고 작성.
테스트 데이터와 관련이 있기 때문에, 이대로는 실패한다.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant