新增接口重启机器人
This commit is contained in:
parent
e2432b5942
commit
618f91457f
16
src/main/java/com/yutou/qqbot/Controllers/AppController.java
Normal file
16
src/main/java/com/yutou/qqbot/Controllers/AppController.java
Normal 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 "";
|
||||
}
|
||||
}
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user