servlet直接调用spring的serivce方法
ServletContext sc = this.getServletContext();
WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(sc);
this.serviceFacade = (XlycServiceFacade) wac.getBean("XlycServiceFacade");
t = new Timer();
TimerCancelorder tco = new TimerCancelorder();
tco.setServiceFacade(this.serviceFacade);
t.schedule(tco, 0,60*60*1000);
成长的乐趣,在于分享!
|