@RequestMapping(value="/Resync", method = RequestMethod.GET)
public void resync(HttpServletRequest request){
try {
logger.error("-------------开始执行手动同步--------");
WebApplicationContext springContext = WebApplicationContextUtils.getWebApplicationContext(request.getSession().getServletContext());
SyncJob job = (SyncJob)springContext.getBean("syncJob");
job.execute();
logger.error("-------------手动同步执行结束--------");
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
网友评论