java.lang.Object
com.broadleafcommerce.metadata.route.builder.RoutesSpec

public class RoutesSpec extends Object
A specification used for creating a ComponentRouteLocator.
Author:
Nick Crum (ncrum)
  • Constructor Details

    • RoutesSpec

      public RoutesSpec(org.springframework.context.ConfigurableApplicationContext context)
  • Method Details

    • route

      public RoutesSpec route(Function<RouteSpec,RouteSpec> fn)
      Adds a new RouteSpec 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 new RouteSpec with the provided path and configured by the provided function.
      Parameters:
      path - the path of the route
      fn - used for customization the route spec
      Returns:
      this
    • build

      public ComponentRouteLocator build()
    • getContext

      protected org.springframework.context.ConfigurableApplicationContext getContext()