2013年11月4日

摘要: Pay attention:When using these annotations, the object itself has to be created by Spring context. If the object is instantiated in code, then this object is out-of-scope of Spring!Spring不但支持自己定义的@Autowired注解,还支持几个由JSR-250规范定义的注解,它们分别是@Resource、@PostConstruct以及@PreDestroy。 @Resource的作用相当于@Autowired. 阅读全文

posted @ 2013-11-04 20:34 chayu3 阅读(207) 评论(0) 推荐(0)