My usual Java/Kotlin package structure

First preference (Domain driven):

- main
    - profile
        - model
            - Profile.java
            - ProfileRequestDto.java
            - ProfileResponseDto.java
        - ProfileController.java
        - ProfileService.java
        - ProfileRepository.java
    - bankaccount
        - model
            - BankAccount.java
            - BankAccountRequestDto.java
            - BankAccountResponseDto.java
        - BankAccountController.java
        - BankAccountService.java
        - BankAccountRepository.java
    - exception
        - BusinessViolationException.java
    - utils 
        - DateUtil.java
- test

Second preference:

- main
    - controller
        - ProfileController.java
        - BankAccountController.java
    - service
        - ProfileService.java
        - BankAccountService.java
    - model
        - dto 
            - ProfileRequestDto.java
            - ProfileResponseDto.java
            - BankAccountRequestDto.java
            - BankAccountResponseDto.java
        - entity
            - Profile.java
            - BankAccount.java
    - repository
        - ProfileRepository.java
        - BankAccount.java
    - utils 
        - DateUtil.java
    - exception
        - BusinessViolationException.java
- test

results matching ""

    No results matching ""