|
|
|
|
@ -4,6 +4,7 @@ package com.leaper.pm2java.controller;
|
|
|
|
|
import com.leaper.pm2java.entity.AppServerEntity;
|
|
|
|
|
import com.leaper.pm2java.entity.Result;
|
|
|
|
|
import com.leaper.pm2java.service.Pm2JavaService;
|
|
|
|
|
import com.leaper.pm2java.service.impl.Pm2JavaServiceImpl;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
@ -34,8 +35,8 @@ public class AppCenterController {
|
|
|
|
|
//重启
|
|
|
|
|
@PostMapping("restart")
|
|
|
|
|
public Result restart(@RequestBody AppServerEntity appServerEntity){
|
|
|
|
|
pm2JavaService.stop(appServerEntity);
|
|
|
|
|
pm2JavaService.start(appServerEntity);
|
|
|
|
|
pm2JavaService.restart(appServerEntity.getName());
|
|
|
|
|
|
|
|
|
|
return Result.success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|