Notice
Recent Posts
Recent Comments
Link
목록ResponseStatus (1)
SeouliteLab
[Java/자바] Spring @ResponseStatus: HTTP 응답 상태 코드 지정하기
Spring 프레임워크에서 @ResponseStatus 어노테이션은 컨트롤러 메서드의 HTTP 응답 상태 코드를 지정할 때 사용됩니다. 이 글에서는 @ResponseStatus 어노테이션의 사용법과 예제 코드를 통해 자세히 알아보겠습니다. 1. 기본적인 @ResponseStatus 사용법 가장 간단한 형태의 @ResponseStatus 어노테이션은 다음과 같이 컨트롤러 메서드에 적용됩니다. import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.http.HttpStatus; import org.s..
프로그래밍
2024. 3. 12. 11:04