@GetMapping와 @RequestMapping(method = RequestMethod.GET)의 차이점?
일부 Spring Reactive 예제에서 @GetMapping 대신 @RequestMapping가 사용 된 것을 보았습니다.
---
@GetMapping는 @RequestMapping(method = RequestMethod.GET)의 바로 가기 역할을하는 작성된 주석입니다.
@GetMapping는 새로운 주석입니다. 설정을 해야 합니다.
설정 옵션은 다음과 같습니다.
consumes = "text/plain"
consumes = { "text/plain", "application/*"}
---
즉 @GetMapping 자동 설정이 아니라서 2시간동안 삽질 했다...
댓글
댓글 쓰기