
[Spring Boot] 어노테이션 정리
·
Spring boot
컨트롤러@RestController@RestController = @Controller + @ResponseBody컨트롤러에 위 어노테이션을 적용함 예시@RestControllerpublic class TestController {} @GetMapping, @PostMappingSpring 레거시에서는 RequestMapping(value = "path" , method = RequestMethod.GET 또는 POST) 로 적용시켰는데boot 에서는 위 두가지 어노테이션을 사용할 수 있다.GET 요청일때는 GetMappingPOST 요청일때는 PostMapping 예시@RestControllerpublic class TestController { @GetMapping("/test") public ..