diff --git a/framework-docs/modules/ROOT/pages/web/webflux-functional.adoc b/framework-docs/modules/ROOT/pages/web/webflux-functional.adoc index 1093c0c160f1..c74cfe4c3c67 100644 --- a/framework-docs/modules/ROOT/pages/web/webflux-functional.adoc +++ b/framework-docs/modules/ROOT/pages/web/webflux-functional.adoc @@ -803,8 +803,7 @@ Java:: [source,java,indent=0,subs="verbatim,quotes"] ---- ClassPathResource index = new ClassPathResource("static/index.html"); - List extensions = List.of("js", "css", "ico", "png", "jpg", "gif"); - RequestPredicate spaPredicate = path("/api/**").or(path("/error")).or(pathExtension(extensions::contains)).negate(); + RequestPredicate spaPredicate = path("/api/**").or(path("/error")).negate(); RouterFunction redirectToIndex = route() .resource(spaPredicate, index) .build(); @@ -816,9 +815,7 @@ Kotlin:: ---- val redirectToIndex = router { val index = ClassPathResource("static/index.html") - val extensions = listOf("js", "css", "ico", "png", "jpg", "gif") - val spaPredicate = !(path("/api/**") or path("/error") or - pathExtension(extensions::contains)) + val spaPredicate = !(path("/api/**") or path("/error")) resource(spaPredicate, index) } ---- diff --git a/framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc b/framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc index 6ed6f53b0c51..e102f595db57 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc @@ -782,7 +782,7 @@ Java:: ---- ClassPathResource index = new ClassPathResource("static/index.html"); List extensions = List.of("js", "css", "ico", "png", "jpg", "gif"); - RequestPredicate spaPredicate = path("/api/**").or(path("/error")).or(pathExtension(extensions::contains)).negate(); + RequestPredicate spaPredicate = path("/api/**").or(path("/error")).negate(); RouterFunction redirectToIndex = route() .resource(spaPredicate, index) .build(); @@ -794,9 +794,7 @@ Kotlin:: ---- val redirectToIndex = router { val index = ClassPathResource("static/index.html") - val extensions = listOf("js", "css", "ico", "png", "jpg", "gif") - val spaPredicate = !(path("/api/**") or path("/error") or - pathExtension(extensions::contains)) + val spaPredicate = !(path("/api/**") or path("/error")) resource(spaPredicate, index) } ---- diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java index a3b9e46a0f46..3027acf9e553 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RequestPredicates.java @@ -270,7 +270,12 @@ public static RequestPredicate OPTIONS(String pattern) { * Return a {@code RequestPredicate} that matches if the request's path has the given extension. * @param extension the path extension to match against, ignoring case * @return a predicate that matches if the request's path has the given file extension + * @deprecated without replacement to discourage use of path extensions for request + * mapping and for content negotiation (with similar deprecations and removals already + * applied to annotated controllers). For further context, please read issue + * #24179 */ + @Deprecated(since = "7.0", forRemoval = true) public static RequestPredicate pathExtension(String extension) { Assert.notNull(extension, "'extension' must not be null"); return new PathExtensionPredicate(extension); @@ -282,7 +287,12 @@ public static RequestPredicate pathExtension(String extension) { * @param extensionPredicate the predicate to test against the request path extension * @return a predicate that matches if the given predicate matches against the request's path * file extension + * @deprecated without replacement to discourage use of path extensions for request + * mapping and for content negotiation (with similar deprecations and removals already + * applied to annotated controllers). For further context, please read issue + * #24179 */ + @Deprecated(since = "7.0", forRemoval = true) public static RequestPredicate pathExtension(Predicate extensionPredicate) { return new PathExtensionPredicate(extensionPredicate); } @@ -354,7 +364,12 @@ public interface Visitor { * Receive notification of a path extension predicate. * @param extension the path extension that makes up the predicate * @see RequestPredicates#pathExtension(String) + * @deprecated without replacement to discourage use of path extensions for request + * mapping and for content negotiation (with similar deprecations and removals already + * applied to annotated controllers). For further context, please read issue + * #24179 */ + @Deprecated(since = "7.0", forRemoval = true) void pathExtension(String extension); /** @@ -816,6 +831,7 @@ public String toString() { } + @Deprecated(since = "7.0", forRemoval = true) private static class PathExtensionPredicate implements RequestPredicate { private final Predicate extensionPredicate; diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ToStringVisitor.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ToStringVisitor.java index aae2c5086d32..79a33d5c9237 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ToStringVisitor.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/ToStringVisitor.java @@ -102,6 +102,8 @@ public void path(String pattern) { this.builder.append(pattern); } + @SuppressWarnings("removal") + @Deprecated(since = "7.0", forRemoval = true) @Override public void pathExtension(String extension) { this.builder.append(String.format("*.%s", extension)); diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt index 868ab106d9bd..3971f65318e6 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDsl.kt @@ -507,6 +507,11 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct * Route to the given handler function if the given pathExtension predicate applies. * @see RouterFunctions.route */ + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) + @Suppress("removal", "DEPRECATION") fun pathExtension(extension: String, f: suspend (ServerRequest) -> ServerResponse) { builder.add(RouterFunctions.route(RequestPredicates.pathExtension(extension), asHandlerFunction(f))) } @@ -516,12 +521,22 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct * @param extension the path extension to match against, ignoring case * @return a predicate that matches if the request's path has the given file extension */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(extension: String): RequestPredicate = RequestPredicates.pathExtension(extension) /** * Route to the given handler function if the given pathExtension predicate applies. * @see RouterFunctions.route */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(predicate: (String?) -> Boolean, f: suspend (ServerRequest) -> ServerResponse) { builder.add(RouterFunctions.route(RequestPredicates.pathExtension(predicate), asHandlerFunction(f))) } @@ -529,8 +544,12 @@ class CoRouterFunctionDsl internal constructor (private val init: (CoRouterFunct /** * Return a [RequestPredicate] that matches if the request's path matches the given * predicate. - * @see RequestPredicates.pathExtension */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(predicate: (String?) -> Boolean): RequestPredicate = RequestPredicates.pathExtension(predicate) diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt index 8ef85c7d437f..69c7f57bb43e 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt @@ -554,6 +554,11 @@ class RouterFunctionDsl internal constructor (private val init: RouterFunctionDs * Route to the given handler function if the given pathExtension predicate applies. * @see RouterFunctions.route */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(extension: String, f: (ServerRequest) -> Mono) { builder.add(RouterFunctions.route(RequestPredicates.pathExtension(extension)) { f(it).cast(ServerResponse::class.java) }) } @@ -563,12 +568,22 @@ class RouterFunctionDsl internal constructor (private val init: RouterFunctionDs * @param extension the path extension to match against, ignoring case * @return a predicate that matches if the request's path has the given file extension */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(extension: String): RequestPredicate = RequestPredicates.pathExtension(extension) /** * Route to the given handler function if the given pathExtension predicate applies. * @see RouterFunctions.route */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(predicate: (String?) -> Boolean, f: (ServerRequest) -> Mono) { builder.add(RouterFunctions.route(RequestPredicates.pathExtension(predicate)) { f(it).cast(ServerResponse::class.java) }) } @@ -576,8 +591,12 @@ class RouterFunctionDsl internal constructor (private val init: RouterFunctionDs /** * Return a [RequestPredicate] that matches if the request's path matches the given * predicate. - * @see RequestPredicates.pathExtension */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(predicate: (String?) -> Boolean): RequestPredicate = RequestPredicates.pathExtension(predicate) diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RequestPredicatesTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RequestPredicatesTests.java index d97e7a2a1620..9b4a948e4dbd 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RequestPredicatesTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/RequestPredicatesTests.java @@ -296,6 +296,7 @@ void multipleAccepts() { assertThat(predicate.test(request)).isFalse(); } + @SuppressWarnings("removal") @Test void pathExtension() { RequestPredicate predicate = RequestPredicates.pathExtension("txt"); @@ -319,6 +320,7 @@ void pathExtension() { assertThat(predicate.test(request)).isFalse(); } + @SuppressWarnings("removal") @Test void pathExtensionPredicate() { List extensions = List.of("foo", "bar"); diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ToStringVisitorTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ToStringVisitorTests.java index cf93c87c2302..922bd9a5b968 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ToStringVisitorTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/function/server/ToStringVisitorTests.java @@ -29,7 +29,6 @@ import static org.springframework.web.reactive.function.server.RequestPredicates.method; import static org.springframework.web.reactive.function.server.RequestPredicates.methods; import static org.springframework.web.reactive.function.server.RequestPredicates.path; -import static org.springframework.web.reactive.function.server.RequestPredicates.pathExtension; import static org.springframework.web.reactive.function.server.RequestPredicates.queryParam; import static org.springframework.web.reactive.function.server.RouterFunctions.route; @@ -69,8 +68,6 @@ void predicates() { testPredicate(path("/foo"), "/foo"); - testPredicate(pathExtension("foo"), "*.foo"); - testPredicate(contentType(MediaType.APPLICATION_JSON), "Content-Type: application/json"); ToStringVisitor visitor = new ToStringVisitor(); diff --git a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDslTests.kt b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDslTests.kt index 694485361217..ba597f42e541 100644 --- a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDslTests.kt +++ b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/CoRouterFunctionDslTests.kt @@ -333,6 +333,7 @@ class CoRouterFunctionDslTests { null } } + @Suppress("DEPRECATION") GET(pathExtension { it == "properties" }) { ok().bodyValueAndAwait("foo=bar") } diff --git a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDslTests.kt b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDslTests.kt index fbdd18771260..6e0008ae7a78 100644 --- a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDslTests.kt +++ b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDslTests.kt @@ -265,6 +265,7 @@ class RouterFunctionDslTests { Mono.empty() } } + @Suppress("DEPRECATION") GET(pathExtension { it == "properties" }) { ok().bodyValue("foo=bar") } diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java index 28152fe85b61..5e7b0348760f 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java @@ -269,7 +269,12 @@ public static RequestPredicate OPTIONS(String pattern) { * Return a {@code RequestPredicate} that matches if the request's path has the given extension. * @param extension the path extension to match against, ignoring case * @return a predicate that matches if the request's path has the given file extension + * @deprecated without replacement to discourage use of path extensions for request + * mapping and for content negotiation (with similar deprecations and removals already + * applied to annotated controllers). For further context, please read issue + * #24179 */ + @Deprecated(since = "7.0", forRemoval = true) public static RequestPredicate pathExtension(String extension) { Assert.notNull(extension, "'extension' must not be null"); return new PathExtensionPredicate(extension); @@ -281,7 +286,12 @@ public static RequestPredicate pathExtension(String extension) { * @param extensionPredicate the predicate to test against the request path extension * @return a predicate that matches if the given predicate matches against the request's path * file extension + * @deprecated without replacement to discourage use of path extensions for request + * mapping and for content negotiation (with similar deprecations and removals already + * applied to annotated controllers). For further context, please read issue + * #24179 */ + @Deprecated(since = "7.0", forRemoval = true) public static RequestPredicate pathExtension(Predicate extensionPredicate) { return new PathExtensionPredicate(extensionPredicate); } @@ -352,7 +362,12 @@ public interface Visitor { * Receive notification of a path extension predicate. * @param extension the path extension that makes up the predicate * @see RequestPredicates#pathExtension(String) + * @deprecated without replacement to discourage use of path extensions for request + * mapping and for content negotiation (with similar deprecations and removals already + * applied to annotated controllers). For further context, please read issue + * #24179 */ + @Deprecated(since = "7.0", forRemoval = true) void pathExtension(String extension); /** @@ -814,6 +829,7 @@ public String toString() { } + @Deprecated(since = "7.0", forRemoval = true) private static class PathExtensionPredicate implements RequestPredicate { private final Predicate extensionPredicate; diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/ToStringVisitor.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/ToStringVisitor.java index 5611af3995c9..8d1017c582a3 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/function/ToStringVisitor.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/function/ToStringVisitor.java @@ -101,6 +101,8 @@ public void path(String pattern) { this.builder.append(pattern); } + @SuppressWarnings("removal") + @Deprecated(since = "7.0", forRemoval = true) @Override public void pathExtension(String extension) { this.builder.append(String.format("*.%s", extension)); diff --git a/spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt b/spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt index befc5b0f9428..c5e4f461ca1b 100644 --- a/spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt +++ b/spring-webmvc/src/main/kotlin/org/springframework/web/servlet/function/RouterFunctionDsl.kt @@ -549,6 +549,11 @@ class RouterFunctionDsl internal constructor (private val init: (RouterFunctionD * Route to the given handler function if the given pathExtension predicate applies. * @see RouterFunctions.route */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(extension: String, f: (ServerRequest) -> ServerResponse) { builder.add(RouterFunctions.route(RequestPredicates.pathExtension(extension), HandlerFunction(f))) } @@ -558,12 +563,22 @@ class RouterFunctionDsl internal constructor (private val init: (RouterFunctionD * @param extension the path extension to match against, ignoring case * @return a predicate that matches if the request's path has the given file extension */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(extension: String): RequestPredicate = RequestPredicates.pathExtension(extension) /** * Route to the given handler function if the given pathExtension predicate applies. * @see RouterFunctions.route */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(predicate: (String?) -> Boolean, f: (ServerRequest) -> ServerResponse) { builder.add(RouterFunctions.route(RequestPredicates.pathExtension(predicate), HandlerFunction(f))) } @@ -573,6 +588,11 @@ class RouterFunctionDsl internal constructor (private val init: (RouterFunctionD * predicate. * @see RequestPredicates.pathExtension */ + @Suppress("removal", "DEPRECATION") + @Deprecated("without replacement to discourage use of path extensions for request mapping and for" + + "content negotiation (with similar deprecations and removals already applied to" + + "annotated controllers). For further context, please read issue " + + "https://github.com/spring-projects/spring-framework/issues/24179", replaceWith = ReplaceWith("None")) fun pathExtension(predicate: (String?) -> Boolean): RequestPredicate = RequestPredicates.pathExtension(predicate) diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/function/RequestPredicatesTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/function/RequestPredicatesTests.java index 1f6e1036f6fc..6ba5ef1759c5 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/function/RequestPredicatesTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/function/RequestPredicatesTests.java @@ -223,6 +223,7 @@ void multipleAccepts() { assertThat(predicate.test(request)).isFalse(); } + @SuppressWarnings("removal") @Test void pathExtension() { RequestPredicate predicate = RequestPredicates.pathExtension("txt"); @@ -237,6 +238,7 @@ void pathExtension() { assertThat(predicate.test(initRequest("GET", "/file"))).isFalse(); } + @SuppressWarnings("removal") @Test void pathExtensionPredicate() { List extensions = List.of("foo", "bar"); diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/function/ToStringVisitorTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/function/ToStringVisitorTests.java index 54d754b744dc..ff9ecd92291c 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/function/ToStringVisitorTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/function/ToStringVisitorTests.java @@ -29,7 +29,6 @@ import static org.springframework.web.servlet.function.RequestPredicates.methods; import static org.springframework.web.servlet.function.RequestPredicates.param; import static org.springframework.web.servlet.function.RequestPredicates.path; -import static org.springframework.web.servlet.function.RequestPredicates.pathExtension; import static org.springframework.web.servlet.function.RouterFunctions.route; /** @@ -61,6 +60,7 @@ void nested() { assertThat(result).isEqualTo(expected); } + @SuppressWarnings("removal") @Test void predicates() { testPredicate(methods(HttpMethod.GET), "GET"); @@ -68,8 +68,6 @@ void predicates() { testPredicate(path("/foo"), "/foo"); - testPredicate(pathExtension("foo"), "*.foo"); - testPredicate(contentType(MediaType.APPLICATION_JSON), "Content-Type: application/json"); ToStringVisitor visitor = new ToStringVisitor(); diff --git a/spring-webmvc/src/test/kotlin/org/springframework/web/servlet/function/RouterFunctionDslTests.kt b/spring-webmvc/src/test/kotlin/org/springframework/web/servlet/function/RouterFunctionDslTests.kt index 960dde0f467b..02000d625c8b 100644 --- a/spring-webmvc/src/test/kotlin/org/springframework/web/servlet/function/RouterFunctionDslTests.kt +++ b/spring-webmvc/src/test/kotlin/org/springframework/web/servlet/function/RouterFunctionDslTests.kt @@ -192,6 +192,7 @@ class RouterFunctionDslTests { null } } + @Suppress("DEPRECATION") GET(pathExtension { it == "properties" }) { ok().body("foo=bar") }