diff --git a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/VertxHttpProcessor.java b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/VertxHttpProcessor.java index 5f535780bfd48..c8155cb1f62e1 100644 --- a/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/VertxHttpProcessor.java +++ b/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/VertxHttpProcessor.java @@ -291,7 +291,9 @@ ServiceStartBuildItem finalizeRouter( recorder.finalizeRouter(beanContainer.getValue(), defaultRoute.map(DefaultRouteBuildItem::getRoute).orElse(null), listOfFilters, vertx.getVertx(), lrc, mainRouter, httpRouteRouter.getHttpRouter(), - httpRouteRouter.getMutinyRouter(), + httpRouteRouter.getMutinyRouter(), httpRouteRouter.getFrameworkRouter(), + nonApplicationRootPathBuildItem.isDedicatedRouterRequired(), + nonApplicationRootPathBuildItem.isAttachedToMainRouter(), httpRootPathBuildItem.getRootPath(), launchMode.getLaunchMode(), !requireBodyHandlerBuildItems.isEmpty(), bodyHandler, gracefulShutdownFilter, diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java index 00da9c567b72e..983dbc6e315aa 100644 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java +++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java @@ -334,6 +334,8 @@ public void finalizeRouter(BeanContainer container, Consumer defaultRoute List filterList, Supplier vertx, LiveReloadConfig liveReloadConfig, Optional> mainRouterRuntimeValue, RuntimeValue httpRouterRuntimeValue, RuntimeValue mutinyRouter, + RuntimeValue frameworkRouter, + boolean nonApplicationDedicatedRouter, boolean nonApplicationAttachedToMainRouter, String rootPath, LaunchMode launchMode, boolean requireBodyHandler, Handler bodyHandler, GracefulShutdownFilter gracefulShutdownFilter, ShutdownConfig shutdownConfig, @@ -552,7 +554,11 @@ public void handle(HttpServerRequest event) { } AccessLogHandler handler = new AccessLogHandler(receiver, accessLog.pattern, getClass().getClassLoader(), accessLog.excludePattern); + if (nonApplicationDedicatedRouter && !nonApplicationAttachedToMainRouter) { + frameworkRouter.getValue().route().order(Integer.MIN_VALUE).handler(handler); + } httpRouteRouter.route().order(Integer.MIN_VALUE).handler(handler); + quarkusWrapperNeeded = true; }