From 089438fb913b387a0e220345ab80069e0ffe07cb Mon Sep 17 00:00:00 2001 From: sgibb Date: Mon, 11 Mar 2024 13:15:18 -0400 Subject: [PATCH] Updates MVC Server configuration metadata. See gh-3267 --- .../mvc/config/GatewayMvcProperties.java | 2 +- .../server/mvc/config/RouteProperties.java | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/GatewayMvcProperties.java b/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/GatewayMvcProperties.java index c54e1d39f4..51cad3c1c1 100644 --- a/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/GatewayMvcProperties.java +++ b/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/GatewayMvcProperties.java @@ -43,7 +43,7 @@ public class GatewayMvcProperties { private List routes = new ArrayList<>(); /** - * List of Routes. + * Map of Routes. */ @NotNull @Valid diff --git a/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/RouteProperties.java b/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/RouteProperties.java index 902be00861..5b1c511ccd 100644 --- a/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/RouteProperties.java +++ b/spring-cloud-gateway-server-mvc/src/main/java/org/springframework/cloud/gateway/server/mvc/config/RouteProperties.java @@ -38,20 +38,38 @@ @Validated public class RouteProperties { + /** + * The Route ID. + */ private String id; + /** + * List of predicates for matching the Route. + */ @NotEmpty @Valid private List predicates = new ArrayList<>(); + /** + * List of filters to be applied to the Route. + */ @Valid private List filters = new ArrayList<>(); + /** + * The destination URI. + */ @NotNull private URI uri; + /** + * Metadata associated with the Route. + */ private Map metadata = new HashMap<>(); + /** + * The order of the Route, defaults to zero. + */ private int order = 0; public RouteProperties() {