spring非controller类获取service方法

ApplicationContext ctx = new ClassPathXmlApplicationContext("spring.xml");
pushMessageService = (PushMessageService)ctx.getBean(PushMessageService.class);
List<PushMessage> pmList = pushMessageService.getPushMessageById(userId);
posted @ 2013-10-21 14:00  wang_tale  阅读(497)  评论(0)    收藏  举报