码迷,mamicode.com
首页 > 编程语言 > 详细

spring的BeanFactory加载过程

时间:2016-09-23 13:20:04      阅读:154      评论:0      收藏:0      [点我收藏+]

标签:

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加载过程

标签:

原文地址:http://www.cnblogs.com/zgen/p/5899388.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!