diff --git a/src/main/java/com/yutou/qqbot/Controllers/AppController.java b/src/main/java/com/yutou/qqbot/Controllers/AppController.java new file mode 100644 index 0000000..2c8a29f --- /dev/null +++ b/src/main/java/com/yutou/qqbot/Controllers/AppController.java @@ -0,0 +1,16 @@ +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 ""; + } +} diff --git a/src/main/java/com/yutou/qqbot/QQBotApplication.java b/src/main/java/com/yutou/qqbot/QQBotApplication.java index f225b0f..30fe7ba 100644 --- a/src/main/java/com/yutou/qqbot/QQBotApplication.java +++ b/src/main/java/com/yutou/qqbot/QQBotApplication.java @@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class QQBotApplication { - public static final String version="QQBot v.1.2.1"; + public static final String version="QQBot v.1.2.2"; public static void main(String[] args) { System.out.println("version = " + version); SpringApplication.run(QQBotApplication.class, args);