[Spring] 스프링 빈 조회 - 동일한 타입이 둘 이상인 경우
빈을 타입으로 조회할 경우, 같은 타입의 스프링 빈이 둘 이상이라면 오류가 발생하게 된다. 이때는 빈 이름을 지정해주면 된다. 테스트에 앞서 클래스를 하나 만들고, 그 안에 중복을 테스트하기 위해 새로운 컨테이너 SameBeanConfig.class를 임시로 만들어주자. 아래와 같다. package hello.core.beanfind; import hello.core.AppConfig; import hello.core.discount.DiscountPolicy; import hello.core.member.MemberRepository; import hello.core.member.MemoryMemberRepository; import org.junit.jupiter.api.DisplayName; imp..