class

Analyzer::Specification::SpringCloudGateway

Inherits Analyzer::Specification::SpecificationEngine < Analyzer < FileHelper < Reference < Object

Spring Cloud Gateway routes declared in Spring Boot config: spring.cloud.gateway[.server.webflux|.server.webmvc|.mvc].routes[], each with predicates in shortcut (Path=/a/**,/b, Method=GET,POST) or expanded (name: Path, args: {patterns: [...]}) form. A route without a Method predicate matches every verb; one without a Path predicate is not path-scoped and is skipped.

Constants

FLAG_ARGS = Set {"matchTrailingSlash", "matchOptionalTrailingSeparator"}

Expanded-form args that are flags, not patterns.

ID_LINE = /^[ \t]*-[ \t]*id[ \t]*:[ \t]*["']?([^\s"'#]+)/m

- id: users, for the line a route is declared on.

PREDICATE_KEY = /\Apredicates\[(\d+)\](?:\.(name|args)\b.*)?\z/
PROPERTY_RE = /^\s*spring\.cloud\.gateway((?:\.server\.web(?:flux|mvc)|\.mvc)?\.routes\[\d+\])\.(\S+?)\s*[=:]\s*(.*?)\s*$/
ROUTE_PREFIXES = [["spring", "cloud", "gateway", "routes"] of ::String, ["spring", "cloud", "gateway", "server", "webflux", "routes"] of ::String, ["spring", "cloud", "gateway", "server", "webmvc", "routes"] of ::String, ["spring", "cloud", "gateway", "mvc", "routes"] of ::String]

Class methods

tech_name
Source

Instance methods

analyze
Source
tech

Instance-side view of the same declaration. The per-file rescues live on this base class, which has no way to name the analyzer that is running inside them, so a skipped file could not be attributed to a tech. Deriving it from analyzer_for keeps the name written exactly once.

Source