Class RoutesSpec
- java.lang.Object
-
- com.broadleafcommerce.metadata.route.builder.RoutesSpec
-
public class RoutesSpec extends Object
A specification used for creating aComponentRouteLocator
.- Author:
- Nick Crum (ncrum)
-
-
Constructor Summary
Constructors Constructor Description RoutesSpec(org.springframework.context.ConfigurableApplicationContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ComponentRouteLocator
build()
protected org.springframework.context.ConfigurableApplicationContext
getContext()
RoutesSpec
route(String path, Function<RouteSpec,RouteSpec> fn)
Adds a newRouteSpec
with the provided path and configured by the provided function.RoutesSpec
route(Function<RouteSpec,RouteSpec> fn)
Adds a newRouteSpec
configured by the provided function.
-
-
-
Method Detail
-
route
public RoutesSpec route(Function<RouteSpec,RouteSpec> fn)
Adds a newRouteSpec
configured by the provided function.- Parameters:
fn
- used for customization the route spec- Returns:
- this
-
route
public RoutesSpec route(String path, Function<RouteSpec,RouteSpec> fn)
Adds a newRouteSpec
with the provided path and configured by the provided function.- Parameters:
path
- the path of the routefn
- used for customization the route spec- Returns:
- this
-
build
public ComponentRouteLocator build()
-
getContext
protected org.springframework.context.ConfigurableApplicationContext getContext()
-
-