java.lang.Object
io.microsphere.spring.cloud.gateway.server.webflux.util.GatewayUtils
All Implemented Interfaces:
io.microsphere.util.Utils

public abstract class GatewayUtils extends Object implements io.microsphere.util.Utils
The utilities class for Gateway
Since:
1.0.0
Author:
Mercy
  • Method Details

    • getGatewayProperties

      @NonNull public static Map<String,Object> getGatewayProperties(org.springframework.core.env.ConfigurableEnvironment environment)
      Get the flatten properties of GatewayProperties from the Spring Environment
      Parameters:
      environment - ConfigurableEnvironment
      Returns:
      non-null
    • getRouteProperties

      @NonNull public static Map<String,Object> getRouteProperties(org.springframework.core.env.ConfigurableEnvironment environment, String routeId)
      Get the flatten properties of the specified RouteDefinition in the GatewayProperties from the Spring Environment
      Parameters:
      environment - ConfigurableEnvironment
      routeId - the id of RouteDefinition
      Returns:
      non-null
    • isSuccessRouteLocatorEvent

      public static boolean isSuccessRouteLocatorEvent(org.springframework.cloud.gateway.event.RefreshRoutesResultEvent event)
      Is the specified RefreshRoutesResultEvent success and the source is RouteLocator
      Parameters:
      event - RefreshRoutesResultEvent
      Returns:
      if success and the source is RouteLocator, return true, or false