diff --git a/http-server-jetty/src/main/java/io/micronaut/servlet/jetty/JettyFactory.java b/http-server-jetty/src/main/java/io/micronaut/servlet/jetty/JettyFactory.java index f37a9812..ff3563d1 100644 --- a/http-server-jetty/src/main/java/io/micronaut/servlet/jetty/JettyFactory.java +++ b/http-server-jetty/src/main/java/io/micronaut/servlet/jetty/JettyFactory.java @@ -300,8 +300,8 @@ protected void configureServletInitializer(Server server, ServletContextHandler } List resourceHandlers = Stream.concat( - getStaticResourceConfigurations().stream().map(servletStaticResourceConfiguration -> toHandler(servletStaticResourceConfiguration, ResourceFactory.of(contextHandler))), - Stream.of(contextHandler) + Stream.of(contextHandler), + getStaticResourceConfigurations().stream().map(servletStaticResourceConfiguration -> toHandler(servletStaticResourceConfiguration, ResourceFactory.of(contextHandler))) ).toList(); ContextHandlerCollection contextHandlerCollection = new ContextHandlerCollection( diff --git a/http-server-jetty/src/test/groovy/io/micronaut/servlet/jetty/JettyStaticResourceResolutionSpec.groovy b/http-server-jetty/src/test/groovy/io/micronaut/servlet/jetty/JettyStaticResourceResolutionSpec.groovy index 22631652..d3cf9924 100644 --- a/http-server-jetty/src/test/groovy/io/micronaut/servlet/jetty/JettyStaticResourceResolutionSpec.groovy +++ b/http-server-jetty/src/test/groovy/io/micronaut/servlet/jetty/JettyStaticResourceResolutionSpec.groovy @@ -133,7 +133,10 @@ class JettyStaticResourceResolutionSpec extends Specification implements TestPro EmbeddedServer embeddedServer = ApplicationContext.run(EmbeddedServer, [ 'micronaut.router.static-resources.default.paths': ['classpath:public', 'file:' + tempFile.parent], 'micronaut.router.static-resources.default.mapping': '/static/**']) - HttpClient rxClient = embeddedServer.applicationContext.createBean(HttpClient, embeddedServer.getURL()) + + def url = embeddedServer.getURL() + println("URL IS $url") + HttpClient rxClient = embeddedServer.applicationContext.createBean(HttpClient, url) when: