문서의 이전 판입니다!
@Autowired DefaultListableBeanFactory bf; for (String name : bf.getBeanDefinitionNames()) { System.out.println(name + "\t" bf.getBean(name).getClass().getCanonicalName()); }
동일한 이름의 Bean을 동일 컨텍스트(부모/자식간 말고)에서 여러번 생성할 경우 앞서 생성된 것을 Override 해버린다. java - Defining the same Spring bean twice with same name