Skip to content

Coding Convention

Sim-km edited this page Mar 25, 2024 · 6 revisions

모듈 구성

.
├── Api-Module # 스프링 실행과 presentation 계층을 담당하는 모듈
├── Common-Module # 공통 클래스를 포함하는 모듈
├── Domain-Module/ # 도메인들을 포함하는 모듈
│   ├── Todo-Module/ # 하나의 도메인 모듈
│   │   ├── Todo-Application
│   │   ├── Todo-Domain
│   │   └── Todo-Infrastructure
│   └── User-Module/
│       ├── User-Application
│       ├── User-Domain
│       └── User-Infrastructure    
└── ...

패키지

Presentation 계층

.
└── Api-Module/
    └── src/
        └── main/
            └── java/
                └── com/
                    └── pawith/
                        ├── global/
                        │   └── security
                        └── domain/
                            ├── todo/
                            │   └── controller
                            └── user/
                                └── controller

Application 계층

.
└── com/
    └── pawith/
        └── application/
            ├── dto
            ├── service
            ├── mapper
            └── handler # 이벤트 처리용 패키지   

Domain 계층

.
└── com/
    └── pawith/
        └── domain/
            ├── repository
            ├── service
            ├── exception
            ├── Util.class
            ├── Domain.class
            └── ...

Infrastructure 계층

.
└── com/
    └── pawith/
        ├── mapper
        ├── jpa/
        │   ├── entity
        │   └── repository
        ├── DomainRepositoryImpl.class
        └── ...

클래스 네이밍

메소드 네이밍