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 |