diff --git a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/NodeTreeService.java b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/NodeTreeService.java index c0f5db654a..fd1c1aacf2 100644 --- a/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/NodeTreeService.java +++ b/framework/sdk-parent/sdk/src/main/java/io/metersphere/service/NodeTreeService.java @@ -295,7 +295,7 @@ public class NodeTreeService { StringBuilder path = new StringBuilder(rootPath); - path.append("/" + nodeName); + path.append("/" + nodeName.trim()); String pid; //创建过不创建 @@ -309,7 +309,7 @@ public class NodeTreeService { } while (pathIterator.hasNext()) { - String nextNodeName = pathIterator.next(); + String nextNodeName = pathIterator.next().trim(); path.append("/" + nextNodeName); if (pathMap.get(path.toString()) != null) { pid = pathMap.get(path.toString());