调用Spring的bean

ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
ArticleService service = (ArticleServicel) context.getBean("articleService");

  

posted @ 2014-03-25 10:48  风语9  阅读(91)  评论(0编辑  收藏  举报