fix:生成eps问题

This commit is contained in:
ruying408
2025-04-19 01:25:07 +08:00
parent eab1b92be6
commit 94b2c45eb1

View File

@@ -96,15 +96,16 @@ public class CoolEps {
String methodPath = getMethodUrl(method); String methodPath = getMethodUrl(method);
String escapedMethodPath = methodPath.replace("{", "\\{").replace("}", "\\}"); String escapedMethodPath = methodPath.replace("{", "\\{").replace("}", "\\}");
String prefix = Objects.requireNonNull(getUrl(info)) String prefix = Objects.requireNonNull(getUrl(info))
.replaceFirst("(?s)(.*)" + escapedMethodPath, "$1"); .replaceFirst("(?s)(.*)" + escapedMethodPath, "$1");
Dict result = Dict.create(); Dict result;
int type = 0; int type = 0;
if (prefix.startsWith("/admin")) { if (prefix.startsWith("/admin")) {
result = admin; result = admin;
} } else if (prefix.startsWith("/app")) {
if (prefix.startsWith("/app")) {
result = app; result = app;
type = 1; type = 1;
} else {
continue;
} }
if (result.get(module) == null) { if (result.get(module) == null) {
result.set(module, new ArrayList<Dict>()); result.set(module, new ArrayList<Dict>());