diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsole.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsole.java index a0a5c08afa0af..a7f999c7053e2 100644 --- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsole.java +++ b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/devmode/console/DevConsole.java @@ -45,7 +45,7 @@ public class DevConsole implements Handler { DevConsole(Engine engine, String httpRootPath, String frameworkRootPath) { this.engine = engine; this.globalData.put("httpRootPath", httpRootPath); - this.globalData.put("frameworkRootPath", frameworkRootPath); + this.globalData.put("frameworkRootPath", cleanFrameworkRootPath(frameworkRootPath)); this.globalData.put("quarkusVersion", Version.getVersion()); this.globalData.put("applicationName", config.getOptionalValue("quarkus.application.name", String.class).orElse("")); this.globalData.put("applicationVersion", @@ -97,6 +97,19 @@ public void handle(RoutingContext ctx) { } } + /** + * This removes the last / from the path + * + * @param p the path + * @return the path without the last / + */ + private String cleanFrameworkRootPath(String p) { + if (p != null && !p.isEmpty() && p.endsWith("/")) { + return p.substring(0, p.length() - 1); + } + return p; + } + private String getExtensionName(String namespace) { Map map = extensions.get(namespace); if (map == null)