HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
🍒
[팀10] CherryBoys❤️
/
⌨️
백엔드
/
📌
코드 컨벤션
📌

코드 컨벤션

Status
컨벤션
Assign
테스트 코드
단위 테스트로 진행
1. Service Test → 2. Controller Test
단위 테스트는 Mock 사용
공통 코드
  • 예외 처리
Config
  • JpaAuditing
  • Swagger
코딩 컨벤션
GoogleStyle_final.xml
21.2KB
  • GoogleStyle 명환님 버전 테스트 해보고 결정!
  • Converter Class 사용
    • 클래스명 : 도메인명+Converter
    • 메서드명 : convertTo + DTO명/Entity명
  • Controller 메서드명 / Service 메서드명
    • signUpUser(기능명에 맞게) / save(User) (repository method 비슷하게)
  • Dto 명
    • 도메인+행위+Request
    • ~Request, ~Response
  • lombok
    • @NoArgsConstructor - protected
    • @Getter
    • @Builder - 클래스 레벨X - 객체 생성 메서드에 붙이기 - 4개이상
  • 테스트코드
    • 클래스명 : 기존클래스명 + Test
    • 메서드명 : 메서드명 + Test / PagingTest
    • @DisplayName("~~ 테스트")
  • 패키지 구조
    • src/main/java
      • global
        • error
        • config
        • response
          • ApiResonse
        • domain
          • vo
      • domains
        • {도메인}
          • controller
          • service
          • repository
          • domain
            • vo
          • dto
            • request
            • response
          • converter
 
IntelliJ 설정
https://nesoy.github.io/articles/2018-09/Intellij-Auto-Convention ← 적용