spring-framework / org.springframework.web.reactive.function.server / RouterFunctionDsl / resources


fun resources(path: String, location: Resource): Unit

Route requests that match the given pattern to resources relative to the given root location.

See Also


fun resources(lookupFunction: (ServerRequest) -> Mono<Resource>): Unit

Route to resources using the provided lookup function. If the lookup function provides a Resource for the given request, it will be it will be exposed using a HandlerFunction that handles GET, HEAD, and OPTIONS requests.