🚨 이 글은 자바를 공부하면서 모르는 내용을 정리한 내용입니다. 계속 수정 중이며, 가독성이 좋지 않을 수 있으니 주의바랍니다.
@GetMapping
어노테이션은 HTTP GET 요청을 처리하는 메서드를 맵핑(@RequestMapping) 하는 어노테이션이다. 메서드(url)에 따라 어떤 페이지를 보여줄지 결정하는 역할을 한다. 추가적인 종류는 다음과 같다.
클라이언트 -- (RequestBody)
--> 서버
클라이언트 <-- (ResponseBody)
-- 서버
컨트롤러에서 데이터를 인자에 할당하는 대표적인 방법으로는 @RequestBody
와 @RequestParam
이 있다.