Notice
Recent Posts
Recent Comments
Link
목록RestController (1)
SeouliteLab
[Java/자바] Spring @RestController: RESTful 웹 서비스를 위한 컨트롤러 >
Spring 프레임워크에서 @RestController 어노테이션은 RESTful 웹 서비스를 개발할 때 사용됩니다. 이 어노테이션을 사용하면 각 핸들러 메서드의 반환 값이 HTTP 응답 본문으로 직접 전송됩니다. 이 글에서는 @RestController 어노테이션의 사용법과 예제 코드를 통해 자세히 알아보겠습니다. 1. 기본적인 @RestController 사용법 가장 간단한 형태의 @RestController 어노테이션은 다음과 같이 컨트롤러 클래스에 적용됩니다. import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestControl..
프로그래밍
2024. 3. 12. 11:11