Class UriSpec
- java.lang.Object
-
- org.springframework.cloud.gateway.route.builder.UriSpec
-
- Direct Known Subclasses:
BooleanSpec,GatewayFilterSpec,PredicateSpec
public class UriSpec extends Object
A specification to add a URI to a route.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UriSpeccustomize(Consumer<Route.AsyncBuilder> routeConsumer)UriSpecmetadata(String key, Object value)UriSpecmetadata(Map<String,Object> metadata)UriSpecreplaceMetadata(Map<String,Object> metadata)Buildable<Route>uri(String uri)Set the URI for the route.Buildable<Route>uri(URI uri)Set the URI for the route.
-
-
-
Method Detail
-
customize
public UriSpec customize(Consumer<Route.AsyncBuilder> routeConsumer)
-
uri
public Buildable<Route> uri(String uri)
Set the URI for the route.- Parameters:
uri- the URI for the route- Returns:
- a
Route.AsyncBuilder
-
uri
public Buildable<Route> uri(URI uri)
Set the URI for the route.- Parameters:
uri- the URI for the route.- Returns:
- a
Route.AsyncBuilderS
-
-