Commit 94a62174 by huangfusuper

java参数替换 命令日志信息更新

parent 30669089
...@@ -144,13 +144,12 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService { ...@@ -144,13 +144,12 @@ public class ApiFlowOperatingServiceImpl implements ApiFlowOperatingService {
String runCommand = node.getRunCommand(); String runCommand = node.getRunCommand();
if(StringUtils.isNoneBlank(runCommand)){ if(StringUtils.isNoneBlank(runCommand)){
if(runCommand.startsWith(JAVA_TYPE) && CollectionUtil.isNotEmpty(publicParam)){ if(runCommand.startsWith(JAVA_TYPE) && CollectionUtil.isNotEmpty(publicParam)){
publicParam.forEach((k,v) ->{ for (Map.Entry<String, String> stringStringEntry : publicParam.entrySet()) {
if(!"auditTime".equals(k)){ if(!"auditTime".equals(stringStringEntry.getKey())){
String keyName = String.format("${%s}",k); String keyName = String.format("${%s}",stringStringEntry.getKey());
runCommand.replace(keyName, v); runCommand = runCommand.replace(keyName,stringStringEntry.getValue());
} }
}
});
node.setRunCommand(runCommand); node.setRunCommand(runCommand);
} }
} }
......
...@@ -87,6 +87,11 @@ public class PlaceholderUtils { ...@@ -87,6 +87,11 @@ public class PlaceholderUtils {
command = String.format("java&&-jar&&%s&&%s&&%s",jarName,env,paramSuffix); command = String.format("java&&-jar&&%s&&%s&&%s",jarName,env,paramSuffix);
} }
command = commandDateReplace(param, command); command = commandDateReplace(param, command);
for (Map.Entry<String, String> stringStringEntry : param.entrySet()) {
String keyName = String.format("${%s}",stringStringEntry.getKey());
command = command.replace(keyName, stringStringEntry.getValue());
}
} }
return command; return command;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment