@Autowired

在applicationContext.xml中加入:

<!-- 该 BeanPostProcessor 将自动对标注 @Autowired 的 Bean 进行注入 -->     
<bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>  

@Autowired 自动装配get..set..

 

posted @ 2013-07-10 14:38  陈跳跳  阅读(194)  评论(0)    收藏  举报