ApplicationContext ctx = new ClassPathXmlApplicationContext("spring.xml");pushMessageService = (PushMessageService)ctx.getBean(PushMessageService.class);List<PushMessage> pmList = pushMessageService.getPushMessageById(userId);