[SpringBoot] Naming methods in each layer

2023. 2. 9. 09:32·JVM/Spring

 

There's no strict stnadard naming convention in SpringBoot, Howevere there's some best practice.

 

Controller Layer

The methods in the controller should be named based on the HTTP method.

  • getUser
  • postUser
  • deleteOrder

Service Layer

Methods in service layer should be descriptive and prefixed with a verb

  • createUser()
  • updateUser()
  • deleteUser()

Persistence Layer

Methods in persistence layer named data operation as shwon below

  • save()
  • findById()
  • findAll()
  • delete()
저작자표시 (새창열림)

'JVM > Spring' 카테고리의 다른 글

[Spring] logback-spring.xml  (0) 2023.02.21
[Spring] ConfigurationProperties + ConfigurationPropertiesScan  (0) 2023.02.13
[Spring] Library 살펴보기 및 스프링 환경설정  (0) 2022.12.12
[Spring] Bean Scope  (0) 2022.12.07
[Spring] 빈 생명주기 콜백  (0) 2022.12.06
'JVM/Spring' 카테고리의 다른 글
  • [Spring] logback-spring.xml
  • [Spring] ConfigurationProperties + ConfigurationPropertiesScan
  • [Spring] Library 살펴보기 및 스프링 환경설정
  • [Spring] Bean Scope
M_Falcon
M_Falcon
  • M_Falcon
    Falcon
    M_Falcon
  • 전체
    오늘
    어제
    • 분류 전체보기 (429)
      • Web (16)
        • Nodejs (14)
        • Javascript (23)
        • FrontEnd (4)
      • DataBase (39)
        • Fundamental (1)
        • Redis (4)
        • PostgreSQL (10)
        • NoSQL (4)
        • MySQL (9)
        • MSSQL (3)
        • Error (4)
      • Algorithm (79)
        • Algorithm (문제풀이) (56)
        • Algorithm (이론) (23)
      • JVM (64)
        • Spring (13)
        • JPA (5)
        • Kotlin (13)
        • Java (23)
        • Error (7)
      • 기타 (68)
        • Kafka (3)
        • Kubernetes (3)
        • Docker (12)
        • git (19)
        • 잡동사니 (26)
      • 재테크 (11)
        • 세무 (4)
        • 투자 (3)
        • 보험 (0)
      • BlockChain (2)
        • BitCoin (0)
      • C (32)
        • C (10)
        • C++ (17)
        • Error (3)
      • Low Level (8)
        • OS (3)
        • 시스템 보안 (5)
      • 네트워크 (3)
      • LINUX (30)
        • Linux (26)
        • Error (4)
      • 저작권과 스마트폰의 이해 (0)
      • 생각 뭉치 (6)
      • 궁금증 (2)
      • Private (4)
        • 이직 경험 (0)
        • 꿈을 찾아서 (1)
      • Android (21)
        • OS (4)
  • 블로그 메뉴

    • 홈
    • WEB
    • 알고리즘
    • DataBase
    • Linux
    • Mobile
    • C
    • 방명록
  • 링크

    • github
  • 공지사항

  • 인기 글

  • 태그

    Git
    알고리즘
    PostgreSQL
    Spring
    JPA
    docker
    android
    algorithm
    java
    백준
    Bitcoin
    프로그래머스
    kafka
    Kotlin
    javascript
    database
    ubuntu
    Programmers
    C++
    linux
  • hELLO· Designed By정상우.v4.10.3
M_Falcon
[SpringBoot] Naming methods in each layer
상단으로

티스토리툴바