spring从容器中取bean

 @Service
public class CommandServiceImpl implements ICommandService{
@Autowired
ApplicationContext applicationContext;
......
//从容器中获取指令实现类实例
Object o=applicationContext.getBean("xxx"); 


posted on 2012-09-06 17:44  dhj  阅读(139)  评论(0)    收藏  举报

导航