브랜치 전략
|-- main
|-- develop ✅ gitaction target
|-- feature/<# issue_number>
ex) feature/#123
커밋 규칙
| 이모티콘 | 문자 | 커밋 유형 | 의미 |
|---|---|---|---|
| ✨ | :sparkles: | feat |
새로운 기능 추가 |
| 🐛 | :bug: | fix |
버그 수정 |
| 📝 | :memo: | docs |
문서 수정 (md 파일) |
| ♻️ | :recycle: | refactor |
코드 리팩토링 |
| 💄 | :lipstick: | style |
코드 formatting, 세미콜론 누락, 코드 자체의 변경이 없는 경우 |
| ✅ | :white_check_mark: | test |
테스트 코드, 리팩토링 테스트 코드 추가 |
| 🚀 | :rocket: | chore |
패키지 매니저 수정 (Dockerfile, gradle, sh, yml) |
| 🚑 | :ambulance: | !hotfix |
급하게 치명적인 버그를 고쳐야 하는 경우 |
✨ feat: 로그인 개발 (#issue_number)
커밋은 웬만하면 나눠서 하기
코드 리뷰 - x
필수 2인 이상 승인?
이슈 → 풀리퀘
패키지 구조 계층형 vs 도메인형
패키지 구조 - 도메인형
com
ㄴ example
ㄴ unimade
ㄴ domain
| ㄴ account
| | ㄴ controller
| | ㄴ dto
| | ㄴ entity
| | ㄴ exception
| | ㄴ repository
| | ㄴ service
| ㄴ user
| | ㄴ controller
| | ㄴ dto
| | ㄴ entity
| | ㄴ exception
| | ㄴ repository
| | ㄴ service
| ...
ㄴ global
ㄴ auth
ㄴ common
ㄴ config
ㄴ error
ㄴ infra
ㄴ util
Converter 사용? - x
ServiceImpl 사용? - interface 안쓰는 것 선호 - x
Service - command / Query 분리 - 0
DTO
record vs static class? - class
목적어 + 동사 순서로 구성 ex) MemberCreateRequest
DTO 에 변환 로직만 넣기 (toEntity, of, from)
무조건 builder 패턴
@NotBlank → Controller Request 에서 @Valid 를 통해 수행
class
Method
Lombok 컨벤션
@Setter 사용 금지 → entity에서 매서드 구현@Getter 는 허용ToString 은 구현해서 사용update 등 속성 다량 수정 시 → entity에서 매서드 구현
주석
// TODO 주석처리 하고 PR 에 명시하기커스텀 에러 응답 처리