13주차 내용 정리

2020. 12. 11. 22:54front-end

  • Annotation조사

    • @RequestMapping : 특정 페이지에서 url을 요청하면 알맞는 메서드를 mapping시켜줍니다.

    • @GetMapping : RequestMapping과 같습니다.

    • @PostMapping: RequestMapping과 같습니다.

    • @RequestParam: request에서 매개변수(parameter)를 가져옵니다.

    • @PathVariable: 메서드의 매개변수 앞에 있으며 URL에서 값을 변수로 받아옵니다.

    • @RequestBody: request를 받은 데이터를 클래스나 모델로 mapping시켜줍니다.

    • @ModelAttribute: jsp 파일들이 들어있는 view에서 넘어온 parameter를 클래스의 멤버변수로 묶어줍니다. 

  • Controller의 Parameter의 종류(6개 이상 조사)

  • httpServletRequest.getParameter
  • httpServletRequest.getAttribute
  • @RequestParam
  • @RequestBody
  • @PathVariable
  • @ModelAttribute
  • Controller의 리턴타입 종류(4개 이상 조사)

  • ModelAndView
  • String
  • void
  • Object
  • @ResponseBody

 

'front-end' 카테고리의 다른 글

14주차 실습  (0) 2020.12.13
14주차 개념정리  (0) 2020.12.13
13주차 과제  (0) 2020.12.10
13주차 개념 정리  (0) 2020.11.22
13주차 실습  (0) 2020.11.22