ApplicationContext factory=new ClassPathXmlApplicationContext("classpath:applicationContext.xml"); String[] s = factory.getBeanDefinitionNames(); for(String ss:s){ System.out.println(ss); }userServiceImpluserControlleruserDaoImplorg.springframework.context.annotation.internalConfigurationAnnotationProcessororg.springframework.context.annotation.internalAutowiredAnnotationProcessororg.springframework.context.annotation.internalRequiredAnnotationProcessororg.springframework.context.annotation.internalCommonAnnotationProcessororg.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor#0org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessororg.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor @Autowired private IUserService userService; public void say(){ userService.say(); }
添加回答
举报
0/150
提交
取消