类 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
-
字段概要
字段 -
构造器概要
构造器构造器说明DefaultGatewayRoute(org.springframework.cloud.gateway.route.RouteDefinitionLocator routeDefinitionLocator, org.springframework.cloud.gateway.route.RouteDefinitionWriter routeDefinitionWriter, org.springframework.cloud.gateway.config.GatewayProperties gatewayProperties) -
方法概要
修饰符和类型方法说明voidadd(GatewayRouteInfoEntity gatewayRouteInfoEntity) 增加路由信息voidaddRoute(org.springframework.cloud.gateway.route.RouteDefinition routeDefinition) 新增路由配置voidconvertFilters(List<org.springframework.cloud.gateway.filter.FilterDefinition> filterDefinitionList, List<String> filterList, List<GatewayRouteInfoEntity.Filter> userFilterList) 转换过滤器信息voidconvertPredicates(List<org.springframework.cloud.gateway.handler.predicate.PredicateDefinition> predicateDefinitionList, List<String> predicateList, List<GatewayRouteInfoEntity.Predicate> userPredicateList) 转换断言信息org.springframework.cloud.gateway.route.RouteDefinitionconvertRoute(GatewayRouteInfoEntity gatewayRouteInfoEntity) 转换路由配置convertRoute(org.springframework.cloud.gateway.route.RouteDefinition routeDefinition) 路由定义转换为配置convertURI(String value) 转换url信息void删除路由信息voiddeleteRoute(org.springframework.cloud.gateway.route.RouteDefinition routeDefinition) 删除路由配置booleanisInternal(Map<String, String> args) 获取已经生效的路由信息voidmodify(GatewayRouteInfoEntity gatewayRouteInfoEntity) 修改路由信息voidmodifyRoute(org.springframework.cloud.gateway.route.RouteDefinition routeDefinition) 修改路由配置voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) Set the ApplicationEventPublisher that this object runs in.void更新数据voidupdateAll(List<GatewayRouteInfoEntity> gatewayRouteEntityList) 更新数据
-
字段详细资料
-
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
增加路由信息- 指定者:
add在接口中GatewayRoute- 参数:
gatewayRouteInfoEntity-
-
modify
修改路由信息- 指定者:
modify在接口中GatewayRoute- 参数:
gatewayRouteInfoEntity-
-
delete
删除路由信息- 指定者:
delete在接口中GatewayRoute- 参数:
routeId-
-
updateAll
更新数据- 指定者:
updateAll在接口中GatewayRoute- 参数:
gatewayRouteEntityList-
-
updateAll
更新数据- 指定者:
updateAll在接口中GatewayRoute- 参数:
gatewayStrategyRouteConfig-
-
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
-
convertURI
转换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
-