ludc
2024-02-29 eada8c650d43765a6bf0993af5fb771b8c0b363c
Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java
@@ -179,12 +179,12 @@
      }
      // 未从库中查询到,需要生成服务信息保存默认信息到库中
      DeployApps defaultDeployApps = new DeployApps();
      defaultDeployApps.setLogPath(PARENTPATH + deployAppsVO.getName().replace("-","_") + LOGPATH);
      defaultDeployApps.setLogPath(PARENTPATH + SEPARATOR + deployAppsVO.getName().replace("-","_") + LOGPATH);
      defaultDeployApps.setServerName(deployAppsVO.getName());
      defaultDeployApps.setStartCmd(CmdConfigEnum.START_CMD.getValue() + deployAppsVO.getName());
      defaultDeployApps.setStopCmd(CmdConfigEnum.STOP_CMD.getValue() + deployAppsVO.getName());
      defaultDeployApps.setRestartCmd(CmdConfigEnum.RESTART_CMD.getValue() + deployAppsVO.getName());
      defaultDeployApps.setServerPath(PARENTPATH + deployAppsVO.getName().replace("-","_"));
      defaultDeployApps.setServerPath(PARENTPATH + SEPARATOR + deployAppsVO.getName().replace("-","_"));
      int eft = deployAppsMapper.insert(defaultDeployApps);
      if (!SqlHelper.retBool(eft)) {
         throw new ServiceException("生成默认服务信息到库中时失败!");
@@ -357,6 +357,15 @@
         }
         // 等待命令执行完成
         int exitCode = process.waitFor();
         // 读取命令执行的错误输出流
         BufferedReader errorReader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
         StringBuilder errorOutput = new StringBuilder();
         String errorLine;
         while ((errorLine = errorReader.readLine()) != null) {
            errorOutput.append(errorLine).append("\n");
         }
         String errorOutputString = errorOutput.toString();
         log.info("错误输出:" + errorOutputString);
         log.info("命令执行结果:" + output.toString()+":"+exitCode);
         return output.toString();
      }catch (IOException | InterruptedException e){