bean

    예제로 배우는 스프링 프레임워크 입문 - Spring Bean

    빈 (Bean) 스프링 IoC 컨테이너가 관리하는 객체 // applicationContext의 개입 없이 만들어 졌으므로 아래 객체는 Bean이 아니다. OwnerController ownerController = new OwnerController(); OwnerController bean = applicationContext.getBean(OwnerController.class); // applicationContext가 관리하므로 위 객체는 Bean이다. 어떻게 등록하지? Component Scanning @Component @Repository @Service @Controller Configuration @Controller annotation에는 @Component annotation이라는 ..