pathExtension

fun pathExtension(extension: String, f: (ServerRequest) -> Mono<out ServerResponse>)
fun pathExtension(predicate: (String?) -> Boolean, f: (ServerRequest) -> Mono<out ServerResponse>)

Deprecated

without replacement to discourage use of path extensions for request mapping and forcontent negotiation (with similar deprecations and removals already applied toannotated controllers). For further context, please read issue https://github.com/spring-projects/spring-framework/issues/24179

Replace with

None

Route to the given handler function if the given pathExtension predicate applies.

See also


Deprecated

without replacement to discourage use of path extensions for request mapping and forcontent negotiation (with similar deprecations and removals already applied toannotated controllers). For further context, please read issue https://github.com/spring-projects/spring-framework/issues/24179

Replace with

None

Return a RequestPredicate that matches if the request's path has the given extension.

Return

a predicate that matches if the request's path has the given file extension

Parameters

extension

the path extension to match against, ignoring case


Deprecated

without replacement to discourage use of path extensions for request mapping and forcontent negotiation (with similar deprecations and removals already applied toannotated controllers). For further context, please read issue https://github.com/spring-projects/spring-framework/issues/24179

Replace with

None

Return a RequestPredicate that matches if the request's path matches the given predicate.