https://naver.github.io/hackday-conventions-java/ 컨트롤러 네이밍 자유 서비스 1순위 : create, update, read, remove 2순위 : 작업의 의미를 담아서 짓기 createPostBy(email, dto) readAllArticlesBy() readArticleBy() updatePostBy() EntityUpdateDto removeMemberBy() return new ResponseEntity<>(myProfile, HttpStatus.OK); 하나면 쿼리파라미터 search?name= Request username email this.toRegister Register username email 네 개 이상의 필드 -> DTO 사용 exception ErrorCode 형태로 사용 -> 초기 세팅 필요 commit https://kdjun97.github.io/git-github/commit-convention/ ``` @PatchMapping("/profile") public ResponseEntity<UserResponseDto> updateUser(@RequestBody UserUpdateDto dto) { String username = SecurityUtils.getCurrentUsername(); UserResponseDto newProfile = userService.updateUserProfile(username, dto); return new ResponseEntity<>(newProfile,HttpStatus.OK); } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up