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);

你可能感兴趣的:(spring,servlet)