@@ -549,6 +549,11 @@ class RouterFunctionDsl internal constructor (private val init: (RouterFunctionD
549
549
* Route to the given handler function if the given pathExtension predicate applies.
550
550
* @see RouterFunctions.route
551
551
*/
552
+ @Suppress(" removal" , " DEPRECATION" )
553
+ @Deprecated(" without replacement to discourage use of path extensions for request mapping and for" +
554
+ " content negotiation (with similar deprecations and removals already applied to" +
555
+ " annotated controllers). For further context, please read issue " +
556
+ " https://github.com/spring-projects/spring-framework/issues/24179" , replaceWith = ReplaceWith (" None" ))
552
557
fun pathExtension (extension : String , f : (ServerRequest ) -> ServerResponse ) {
553
558
builder.add(RouterFunctions .route(RequestPredicates .pathExtension(extension), HandlerFunction (f)))
554
559
}
@@ -558,12 +563,22 @@ class RouterFunctionDsl internal constructor (private val init: (RouterFunctionD
558
563
* @param extension the path extension to match against, ignoring case
559
564
* @return a predicate that matches if the request's path has the given file extension
560
565
*/
566
+ @Suppress(" removal" , " DEPRECATION" )
567
+ @Deprecated(" without replacement to discourage use of path extensions for request mapping and for" +
568
+ " content negotiation (with similar deprecations and removals already applied to" +
569
+ " annotated controllers). For further context, please read issue " +
570
+ " https://github.com/spring-projects/spring-framework/issues/24179" , replaceWith = ReplaceWith (" None" ))
561
571
fun pathExtension (extension : String ): RequestPredicate = RequestPredicates .pathExtension(extension)
562
572
563
573
/* *
564
574
* Route to the given handler function if the given pathExtension predicate applies.
565
575
* @see RouterFunctions.route
566
576
*/
577
+ @Suppress(" removal" , " DEPRECATION" )
578
+ @Deprecated(" without replacement to discourage use of path extensions for request mapping and for" +
579
+ " content negotiation (with similar deprecations and removals already applied to" +
580
+ " annotated controllers). For further context, please read issue " +
581
+ " https://github.com/spring-projects/spring-framework/issues/24179" , replaceWith = ReplaceWith (" None" ))
567
582
fun pathExtension (predicate : (String? ) -> Boolean , f : (ServerRequest ) -> ServerResponse ) {
568
583
builder.add(RouterFunctions .route(RequestPredicates .pathExtension(predicate), HandlerFunction (f)))
569
584
}
@@ -573,6 +588,11 @@ class RouterFunctionDsl internal constructor (private val init: (RouterFunctionD
573
588
* predicate.
574
589
* @see RequestPredicates.pathExtension
575
590
*/
591
+ @Suppress(" removal" , " DEPRECATION" )
592
+ @Deprecated(" without replacement to discourage use of path extensions for request mapping and for" +
593
+ " content negotiation (with similar deprecations and removals already applied to" +
594
+ " annotated controllers). For further context, please read issue " +
595
+ " https://github.com/spring-projects/spring-framework/issues/24179" , replaceWith = ReplaceWith (" None" ))
576
596
fun pathExtension (predicate : (String? ) -> Boolean ): RequestPredicate =
577
597
RequestPredicates .pathExtension(predicate)
578
598
0 commit comments