From 5cbd0bef1c1a3053f7cad91c4a862f7f822412f6 Mon Sep 17 00:00:00 2001 From: Tarte Date: Sat, 28 Mar 2026 16:35:11 +0900 Subject: [PATCH] docs: Add required dependencies for JsonToGrpc filter The JsonToGrpc GatewayFilter relies on several optional dependencies that are not included transitively. Without them, users encounter a NoClassDefFoundError at runtime when the filter is invoked. Documented required dependencies: - io.grpc:grpc-netty - io.grpc:grpc-protobuf - io.grpc:grpc-stub - com.google.protobuf:protobuf-java-util Fixes gh-3424 Signed-off-by: Tarte --- .../jsontogrpc-factory.adoc | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/gatewayfilter-factories/jsontogrpc-factory.adoc b/docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/gatewayfilter-factories/jsontogrpc-factory.adoc index b5ce622e1..77784f5e5 100644 --- a/docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/gatewayfilter-factories/jsontogrpc-factory.adoc +++ b/docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/gatewayfilter-factories/jsontogrpc-factory.adoc @@ -3,6 +3,34 @@ The JSONToGRPC GatewayFilter Factory converts a JSON payload to a gRPC request. +[[jsontogrpc-dependencies]] +== Required Dependencies + +The `JsonToGrpc` filter relies on optional dependencies that are not included transitively. +You must add the following to your project: + +[source,xml] +---- + + io.grpc + grpc-netty + + + io.grpc + grpc-protobuf + + + io.grpc + grpc-stub + + + com.google.protobuf + protobuf-java-util + +---- + +NOTE: Without these dependencies, the gateway will throw a `NoClassDefFoundError` at runtime when the filter is invoked. + The filter takes the following arguments: * `service`: Short name of the service that handles the request.