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

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

Closed
3 tasks done
DEVZZAME opened this issue Jan 21, 2023 · 1 comment · Fixed by #11
Closed
3 tasks done

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

DEVZZAME opened this issue Jan 21, 2023 · 1 comment · Fixed by #11
Assignees
Labels
enhancement New feature or request

Comments

@DEVZZAME
Copy link
Owner

DEVZZAME commented Jan 21, 2023

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

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

MySQL을 선택하기로 함

@DEVZZAME DEVZZAME added the enhancement New feature or request label Jan 21, 2023
DEVZZAME added a commit that referenced this issue Jan 23, 2023
Spring Boot 에 DB 와 JPA를 사용하도록 의존성 추가
DEVZZAME added a commit that referenced this issue Jan 23, 2023
* jpa auditing 기능을 쓰기 위해 ₩JpaConfig` 추가
* db 접근과 개발 편의를 위한 각종 부트 프로퍼티 적용
* TODO : 패스워드를 프로퍼티에 노출시킴. 처리 필요
DEVZZAME added a commit that referenced this issue Jan 23, 2023
* jpa auditing 기능을 쓰기 위해 ₩JpaConfig` 추가
* db 접근과 개발 편의를 위한 각종 부트 프로퍼티 적용
* TODO : 패스워드를 프로퍼티에 노출시킴. 처리 필요
DEVZZAME added a commit that referenced this issue Jan 23, 2023
1 도메인 클래스 == 1 테이블 매칭되도록 설계
`eqauls()`, `hashCode()` 등이 
도메인 맥락에 맞게끔 디테일하게 설정함
DEVZZAME added a commit that referenced this issue Jan 23, 2023
이걸로 db 에 접근
DEVZZAME added a commit that referenced this issue Jan 23, 2023
기본 CRUD + 연관관계 매핑과 cascading 이 잘 동작하는지 보려고 작성.
테스트 데이터와 관련이 있기 때문에, 이대로는 실패한다.
DEVZZAME added a commit that referenced this issue Jan 23, 2023
DEVZZAME added a commit that referenced this issue Jan 23, 2023
데이터베이스 접근 로직 테스트 정의
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