From 618f91457fb8cb6a1bb1385b43e23d8eb3257be4 Mon Sep 17 00:00:00 2001 From: Yutousama <583819556@qq.com> Date: Sat, 18 Dec 2021 17:33:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3=E9=87=8D?= =?UTF-8?q?=E5=90=AF=E6=9C=BA=E5=99=A8=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yutou/qqbot/Controllers/AppController.java | 16 ++++++++++++++++ .../java/com/yutou/qqbot/QQBotApplication.java | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/yutou/qqbot/Controllers/AppController.java 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);