Class GatewayUtils
- java.lang.Object
-
- io.microsphere.spring.cloud.gateway.server.webflux.util.GatewayUtils
-
- All Implemented Interfaces:
io.microsphere.util.Utils
public abstract class GatewayUtils extends java.lang.Object implements io.microsphere.util.UtilsThe utilities class for Gateway- Since:
- 1.0.0
- Author:
- Mercy
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.lang.Object>getGatewayProperties(org.springframework.core.env.ConfigurableEnvironment environment)Get the flatten properties ofGatewayPropertiesfrom the SpringEnvironmentstatic java.util.Map<java.lang.String,java.lang.Object>getRouteProperties(org.springframework.core.env.ConfigurableEnvironment environment, java.lang.String routeId)Get the flatten properties of the specifiedRouteDefinitionin theGatewayPropertiesfrom the SpringEnvironmentstatic booleanisSuccessRouteLocatorEvent(org.springframework.cloud.gateway.event.RefreshRoutesResultEvent event)Is the specifiedRefreshRoutesResultEventsuccess and the source isRouteLocator
-
-
-
Method Detail
-
getGatewayProperties
@NonNull public static java.util.Map<java.lang.String,java.lang.Object> getGatewayProperties(org.springframework.core.env.ConfigurableEnvironment environment)
Get the flatten properties ofGatewayPropertiesfrom the SpringEnvironment- Parameters:
environment-ConfigurableEnvironment- Returns:
- non-null
-
getRouteProperties
@NonNull public static java.util.Map<java.lang.String,java.lang.Object> getRouteProperties(org.springframework.core.env.ConfigurableEnvironment environment, java.lang.String routeId)Get the flatten properties of the specifiedRouteDefinitionin theGatewayPropertiesfrom the SpringEnvironment- Parameters:
environment-ConfigurableEnvironmentrouteId- the id ofRouteDefinition- Returns:
- non-null
-
isSuccessRouteLocatorEvent
public static boolean isSuccessRouteLocatorEvent(org.springframework.cloud.gateway.event.RefreshRoutesResultEvent event)
Is the specifiedRefreshRoutesResultEventsuccess and the source isRouteLocator- Parameters:
event-RefreshRoutesResultEvent- Returns:
- if success and the source is
RouteLocator, returntrue, orfalse
-
-