首页 > 代码库 > spring的BeanFactory加载过程

spring的BeanFactory加载过程

ApplicationContext spring = new ClassPathXmlApplicationContext("classpath*:spring/applicationContext.xml");CommonBean job = (CommonBean)spring.getBean("activityLotteryJob");

配置:

<context:annotation-config/> 

<context:component-scan base-package="com.cc"> <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan>

@Autowired  AutowiredAnnotationBeanPostProcessor  

@Resource CommonAnnotationBeanPostProcessor

@PersistenceContext PersistenceAnnotationBeanPostProcessor 

@Required   RequiredAnnotationBeanPostProcessor

spring的BeanFactory加载过程