[Spring] 스프링 빈 조회 - 기본
스프링 컨테이너에서 스프링 빈을 찾는 가장 기본적인 조회 방법을 알아보자. .getBean() .getBean(스프링 빈 이름, 타입)과 같은 형식으로 사용되고, 이름을 생략하고 .getBean(타입)으로 사용해도 된다. 만약 조회 대상인 스프링 빈이 존재하지 않는다면 다음과 같은 예외가 발생한다. NoSuchBeanDefinitionException: No bean named '...' available 실제로 코드를 작성해보자. 먼저, 빈의 이름으로 조회하는 테스트 코드이다. package hello.core.beanfind; import hello.core.AppConfig; import hello.core.member.MemberService; import hello.core.member.Memb..