spring-framework / org.springframework.web.servlet.function / RouterFunctionDsl / resources

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

RouterFunctions.resources

fun resources(lookupFunction: (ServerRequest) -> 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.