diff --git a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/mapping/RequestMapper.java b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/mapping/RequestMapper.java index d3f97a7c4bd48..5d8d5fc931191 100644 --- a/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/mapping/RequestMapper.java +++ b/independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/mapping/RequestMapper.java @@ -85,7 +85,7 @@ private RequestMatch mapFromPathMatcher(String path, PathMatcher.PathMatch() { + @Override + public JavaArchive get() { + return ShrinkWrap.create(JavaArchive.class) + .addClass(Resource.class); + } + }); + + @Test + public void testRegularMatch() { + given() + .when().get("/test/list/{seg1}/{seg2}", "key1", "key2") + .then() + .statusCode(200) + .body(is("Path(2): [key1, key2]")); + } + + @Test + public void testEncodedPath() { + given() + .when().get("/test/list/{seg1}/{seg2}", "key/1", "key/2") + .then() + .statusCode(200) + .body(is("Path(2): [key/1, key/2]")); + } + + @Path("/test") + public static class Resource { + @GET + @Path("/list/{primaryKey: .+}") + public String pathAsList(@PathParam("primaryKey") List path) { + return String.format("Path(%d): %s", path.size(), path); + } + } +}