新增接口重启机器人

This commit is contained in:
Yutousama 2021-12-18 17:33:14 +08:00
parent e2432b5942
commit 618f91457f
2 changed files with 17 additions and 1 deletions

View File

@ -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 "";
}
}

View File

@ -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);