类 DefaultGatewayRoute

java.lang.Object
cn.bbwres.biscuit.gateway.route.DefaultGatewayRoute
所有已实现的接口:
GatewayRoute, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationEventPublisherAware

public class DefaultGatewayRoute extends Object implements GatewayRoute, org.springframework.context.ApplicationEventPublisherAware
网关路由默认配置
作者:
zhanglinfeng
  • 字段详细资料

    • EMPTY_JSON_RULE_MULTIPLE

      public static final String EMPTY_JSON_RULE_MULTIPLE
      另请参阅:
  • 构造器详细资料

    • DefaultGatewayRoute

      public DefaultGatewayRoute(org.springframework.cloud.gateway.route.RouteDefinitionLocator routeDefinitionLocator, org.springframework.cloud.gateway.route.RouteDefinitionWriter routeDefinitionWriter, org.springframework.cloud.gateway.config.GatewayProperties gatewayProperties)
  • 方法详细资料

    • add

      public void add(GatewayRouteInfoEntity gatewayRouteInfoEntity)
      增加路由信息
      指定者:
      add 在接口中 GatewayRoute
      参数:
      gatewayRouteInfoEntity -
    • modify

      public void modify(GatewayRouteInfoEntity gatewayRouteInfoEntity)
      修改路由信息
      指定者:
      modify 在接口中 GatewayRoute
      参数:
      gatewayRouteInfoEntity -
    • delete

      public void delete(String routeId)
      删除路由信息
      指定者:
      delete 在接口中 GatewayRoute
      参数:
      routeId -
    • updateAll

      public void updateAll(List<GatewayRouteInfoEntity> gatewayRouteEntityList)
      更新数据
      指定者:
      updateAll 在接口中 GatewayRoute
      参数:
      gatewayRouteEntityList -
    • updateAll

      public void updateAll(String gatewayStrategyRouteConfig)
      更新数据
      指定者:
      updateAll 在接口中 GatewayRoute
      参数:
      gatewayStrategyRouteConfig -
    • locateRoutes

      public Map<String,org.springframework.cloud.gateway.route.RouteDefinition> locateRoutes()
      获取已经生效的路由信息
      返回:
    • convertRoute

      public org.springframework.cloud.gateway.route.RouteDefinition convertRoute(GatewayRouteInfoEntity gatewayRouteInfoEntity)
      转换路由配置
      参数:
      gatewayRouteInfoEntity -
      返回:
    • convertRoute

      public GatewayRouteInfoEntity convertRoute(org.springframework.cloud.gateway.route.RouteDefinition routeDefinition)
      路由定义转换为配置
      参数:
      routeDefinition -
      返回:
    • convertPredicates

      public void convertPredicates(List<org.springframework.cloud.gateway.handler.predicate.PredicateDefinition> predicateDefinitionList, List<String> predicateList, List<GatewayRouteInfoEntity.Predicate> userPredicateList)
      转换断言信息
      参数:
      predicateDefinitionList -
      predicateList -
      userPredicateList -
    • convertFilters

      public void convertFilters(List<org.springframework.cloud.gateway.filter.FilterDefinition> filterDefinitionList, List<String> filterList, List<GatewayRouteInfoEntity.Filter> userFilterList)
      转换过滤器信息
      参数:
      filterDefinitionList -
      filterList -
      userFilterList -
    • isInternal

      public boolean isInternal(Map<String,String> args)
    • convertURI

      public URI convertURI(String value)
      转换url信息
      参数:
      value -
      返回:
    • addRoute

      public void addRoute(org.springframework.cloud.gateway.route.RouteDefinition routeDefinition)
      新增路由配置
      参数:
      routeDefinition -
    • modifyRoute

      public void modifyRoute(org.springframework.cloud.gateway.route.RouteDefinition routeDefinition)
      修改路由配置
      参数:
      routeDefinition -
    • deleteRoute

      public void deleteRoute(org.springframework.cloud.gateway.route.RouteDefinition routeDefinition)
      删除路由配置
      参数:
      routeDefinition -
    • setApplicationEventPublisher

      public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Set the ApplicationEventPublisher that this object runs in.

      Invoked after population of normal bean properties but before an init callback like InitializingBean's afterPropertiesSet or a custom init-method. Invoked before ApplicationContextAware's setApplicationContext.

      指定者:
      setApplicationEventPublisher 在接口中 org.springframework.context.ApplicationEventPublisherAware
      参数:
      applicationEventPublisher - event publisher to be used by this object