@Controller, @Service, @Repository
starryeye:
Spring이 제공하는 어노테이션 중.. @Controller, @Service, @Repository에 대해 알아보자.. 먼저 @Controller이다. @Component의 specialization이라 설명해주고 있다. @Component의 일종이므로, 컴포넌트 스캔에 의해 스프링 컨테이너에 자동으로 등록되는 빈이다. 그리고... handler method에 붙이는 @RequestMapping 어노테이션을 지원해줄 수 있다. 자매품으로 @RestController가 있다. @RestController = @Controller + @ResponseBody @Service이다. @Service 어노테이션은 그냥 @Component와 다를바가 없다. 개발자가 서비스 계층이라 명시 하고 싶을 때 사용한다...