类 Knife4jGatewayAutoConfiguration.Knife4jDiscoverConfiguration
java.lang.Object
com.github.xiaoymin.knife4j.spring.gateway.Knife4jGatewayAutoConfiguration.Knife4jDiscoverConfiguration
@Configuration
@EnableConfigurationProperties(Knife4jGatewayProperties.class)
@ConditionalOnProperty(name="knife4j.gateway.strategy",
havingValue="discover")
public static class Knife4jGatewayAutoConfiguration.Knife4jDiscoverConfiguration
extends Object
-
嵌套类概要
嵌套类 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明configRouteServiceConvert(org.springframework.cloud.gateway.config.GatewayProperties gatewayProperties, Knife4jGatewayProperties knife4jGatewayProperties) 基于Spring Cloud Gateway配置的路由策略customerServiceConvert(Knife4jGatewayProperties knife4jGatewayProperties) 基于Knife4j在discover模式下默认配置的routes规则,添加dynamicRouteServiceConvert(org.springframework.cloud.gateway.route.RouteDefinitionRepository routeDefinitionRepository, Knife4jGatewayProperties knife4jGatewayProperties) 动态网关路由配置serviceChangeListener(org.springframework.cloud.client.discovery.DiscoveryClient discoveryClient, ServiceDiscoverHandler serviceDiscoverHandler, Knife4jGatewayProperties knife4jGatewayProperties) Service ListenerserviceDiscoverHandler(Knife4jGatewayProperties knife4jGatewayProperties)
-
构造器详细资料
-
Knife4jDiscoverConfiguration
public Knife4jDiscoverConfiguration()
-
-
方法详细资料
-
configRouteServiceConvert
@Bean public ConfigRouteServiceConvert configRouteServiceConvert(org.springframework.cloud.gateway.config.GatewayProperties gatewayProperties, Knife4jGatewayProperties knife4jGatewayProperties) 基于Spring Cloud Gateway配置的路由策略- 参数:
gatewayProperties- 网关配置knife4jGatewayProperties- knife4j聚合配置- 返回:
- ConfigRouteServiceConvert
- 从以下版本开始:
- v4.3.0
-
dynamicRouteServiceConvert
@Bean public DynamicRouteServiceConvert dynamicRouteServiceConvert(org.springframework.cloud.gateway.route.RouteDefinitionRepository routeDefinitionRepository, Knife4jGatewayProperties knife4jGatewayProperties) 动态网关路由配置- 参数:
routeDefinitionRepository- 动态路由knife4jGatewayProperties- knife4j聚合配置- 返回:
- DynamicRouteServiceConvert
- 从以下版本开始:
- v4.3.0
-
customerServiceConvert
@Bean public CustomerServiceConvert customerServiceConvert(Knife4jGatewayProperties knife4jGatewayProperties) 基于Knife4j在discover模式下默认配置的routes规则,添加- 参数:
knife4jGatewayProperties- knife4j配置- 返回:
- CustomerServiceConvert
- 从以下版本开始:
- v4.3.0
-
defaultGatewayServiceExcludeService
@Bean("defaultGatewayServiceExcludeService") public GatewayServiceExcludeService defaultGatewayServiceExcludeService() -
serviceDiscoverHandler
@Bean @ConditionalOnMissingBean public ServiceDiscoverHandler serviceDiscoverHandler(Knife4jGatewayProperties knife4jGatewayProperties) -
serviceChangeListener
@Bean public ServiceChangeListener serviceChangeListener(org.springframework.cloud.client.discovery.DiscoveryClient discoveryClient, ServiceDiscoverHandler serviceDiscoverHandler, Knife4jGatewayProperties knife4jGatewayProperties) Service Listener- 参数:
discoveryClient- Registry Service Discovery ClientserviceDiscoverHandler- Service Discover Handler- 返回:
- ServiceListener
-