Skip to content

Commit

Permalink
Implements new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
spencergibb committed Oct 11, 2023
1 parent 5a9b234 commit 3db2b35
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.Map;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
Expand All @@ -26,6 +27,7 @@

import org.springframework.cloud.gateway.server.mvc.common.MvcUtils;
import org.springframework.core.io.Resource;
import org.springframework.http.HttpHeaders;
import org.springframework.web.servlet.function.HandlerFilterFunction;
import org.springframework.web.servlet.function.HandlerFunction;
import org.springframework.web.servlet.function.RequestPredicate;
Expand Down Expand Up @@ -253,6 +255,18 @@ public RouterFunctions.Builder resources(Function<ServerRequest, Optional<Resour
return this;
}

@Override
public RouterFunctions.Builder resources(String pattern, Resource location, BiConsumer<Resource, HttpHeaders> headersConsumer) {
builder.resources(pattern, location, headersConsumer);
return this;
}

@Override
public RouterFunctions.Builder resources(Function<ServerRequest, Optional<Resource>> lookupFunction, BiConsumer<Resource, HttpHeaders> headersConsumer) {
builder.resources(lookupFunction, headersConsumer);
return this;
}

@Override
public RouterFunctions.Builder nest(RequestPredicate predicate,
Supplier<RouterFunction<ServerResponse>> routerFunctionSupplier) {
Expand Down

0 comments on commit 3db2b35

Please sign in to comment.