유효성 검사

Mar 14, 2024
유효성 검사
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> </head> <body> <h1>클라이언트가 요청을 잘못하였습니다.</h1> </body> </html>
@PostMapping("/join") public String join(UserRequest.JoinDTO requestDTO){ System.out.println(requestDTO); // 1. 유효성 검사 if(requestDTO.getUsername().length() < 3){ return "error/400"; }
notion image
notion image
 
의존성 주입(Dependency Injection, DI) : 구성 요소들의 의존관계가 코드 내부가 아닌 외부에서 정의되는 방식
 
Share article

Essential IT