From eada8c650d43765a6bf0993af5fb771b8c0b363c Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 29 二月 2024 21:05:16 +0800 Subject: [PATCH] 代码提交 --- Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java b/Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java index af4bb01..6ac5349 100644 --- a/Source/UBCS/ubcs-service/ubcs-deploy/src/main/java/com/vci/ubcs/deploy/service/impl/DeployAppsServiceImpl.java +++ b/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){ -- Gitblit v1.9.3