From 3f3f77313e064329f2d16b3a5b230ea79226ea8e Mon Sep 17 00:00:00 2001 From: Olga Maciaszek-Sharma Date: Tue, 8 Nov 2022 14:09:39 +0100 Subject: [PATCH] Add more native hints. --- .../cloud/gateway/config/GatewayAutoConfiguration.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/GatewayAutoConfiguration.java b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/GatewayAutoConfiguration.java index 4206d309..140ac87f 100644 --- a/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/GatewayAutoConfiguration.java +++ b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/GatewayAutoConfiguration.java @@ -73,6 +73,7 @@ import org.springframework.cloud.gateway.filter.RouteToRequestUrlFilter; import org.springframework.cloud.gateway.filter.WebsocketRoutingFilter; import org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter; import org.springframework.cloud.gateway.filter.cors.CorsGatewayFilterApplicationListener; +import org.springframework.cloud.gateway.filter.factory.AbstractNameValueGatewayFilterFactory; import org.springframework.cloud.gateway.filter.factory.AddRequestHeaderGatewayFilterFactory; import org.springframework.cloud.gateway.filter.factory.AddRequestHeadersIfNotPresentGatewayFilterFactory; import org.springframework.cloud.gateway.filter.factory.AddRequestParameterGatewayFilterFactory; @@ -866,6 +867,9 @@ class GatewayHints implements RuntimeHintsRegistrar { hints.reflection().registerType(TypeReference.of(PredicateDefinition.class), hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS, MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)); + hints.reflection().registerType(TypeReference.of(AbstractNameValueGatewayFilterFactory.NameValueConfig.class), + hint -> hint.withMembers(MemberCategory.DECLARED_FIELDS, MemberCategory.INVOKE_DECLARED_METHODS, + MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)); } }