提交 59e0ff01 authored 作者: 黄夏豪's avatar 黄夏豪

refactor(base): 修复了代码中不贵珍的部分

上级 e653fd05
...@@ -123,7 +123,7 @@ public class CheckPointUtil { ...@@ -123,7 +123,7 @@ public class CheckPointUtil {
public String completeJsonPathExpression(JsonPathCheckPoint jsonPathCheckPoint, Object jsonObject) { public String completeJsonPathExpression(JsonPathCheckPoint jsonPathCheckPoint, Object jsonObject) {
String result = jsonPathCheckPoint.getExpression(); String result = jsonPathCheckPoint.getExpression();
//todo 先将动态变量都还原出来 //todo 李迪凡 先将result中的动态变量都还原出来 (先后顺序不能乱)得先还原动态变量
//将jsonPath都还原出来 //将jsonPath都还原出来
String regex = "(?=\\{)(.*?)(?<=})"; String regex = "(?=\\{)(.*?)(?<=})";
Pattern pattern = Pattern.compile(regex); Pattern pattern = Pattern.compile(regex);
......
...@@ -208,6 +208,7 @@ public class HttpClientUtil { ...@@ -208,6 +208,7 @@ public class HttpClientUtil {
Pattern pattern = Pattern.compile(regex); Pattern pattern = Pattern.compile(regex);
Matcher mat = pattern.matcher(url); Matcher mat = pattern.matcher(url);
while (mat.find()) { while (mat.find()) {
url = url.replaceAll("\\{" + mat.group() + "}", "1"); url = url.replaceAll("\\{" + mat.group() + "}", "1");
} }
break; break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论