throw new DataNotFoundException("User Not Found");
다른 상태 코드 추가 시 해당 표에도 추가
public class 예외처리이름Exception extends ApiException {
// 상태 코드
private static final int status = HttpStatus.상태명.value();
// 메시지 매개변수로 받음
public 예외처리이름Exception(String message) {
super(status, message);
}
}
exception 패키지 하위에 저장