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 ComponentRouteLocatorbuild()protected org.springframework.context.ConfigurableApplicationContextgetContext()RoutesSpecroute(String path, Function<RouteSpec,RouteSpec> fn)Adds a newRouteSpecwith the provided path and configured by the provided function.RoutesSpecroute(Function<RouteSpec,RouteSpec> fn)Adds a newRouteSpecconfigured by the provided function.
-
-
-
Method Detail
-
route
public RoutesSpec route(Function<RouteSpec,RouteSpec> fn)
Adds a newRouteSpecconfigured 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 newRouteSpecwith 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()
-
-