@Controller @RequestMapping(value="/admin/tadu") public class TaDuController { @Resource(name="taDuService") private TaDuService taDuService; @RequestMapping @ResponseBody public String taDuTask(){ if(TaDuServiceImpl.isRunning){ return "taDu task is running already!"; }else{ new Thread(new Runnable() { @Override public void run() { taDuService.cpBookChapterChaseTask(); } }).start(); return "taDu task is start!"; } } }