调用Spring的bean

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

  

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