package com.yutou.qqbot.Controllers; import com.yutou.qqbot.utlis.AppTools; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class AppController { @RequestMapping("/restart.do") @ResponseBody public String restart(){ AppTools.exec("cd /home/yutou/public/servier/qqbot && ./start.sh",null,true,false); return ""; } }