Skip to content

Commit 5cbd0be

Browse files
committed
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 <emprimula@gmail.com>
1 parent 3217852 commit 5cbd0be

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/gatewayfilter-factories/jsontogrpc-factory.adoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33

44
The JSONToGRPC GatewayFilter Factory converts a JSON payload to a gRPC request.
55

6+
[[jsontogrpc-dependencies]]
7+
== Required Dependencies
8+
9+
The `JsonToGrpc` filter relies on optional dependencies that are not included transitively.
10+
You must add the following to your project:
11+
12+
[source,xml]
13+
----
14+
<dependency>
15+
<groupId>io.grpc</groupId>
16+
<artifactId>grpc-netty</artifactId>
17+
</dependency>
18+
<dependency>
19+
<groupId>io.grpc</groupId>
20+
<artifactId>grpc-protobuf</artifactId>
21+
</dependency>
22+
<dependency>
23+
<groupId>io.grpc</groupId>
24+
<artifactId>grpc-stub</artifactId>
25+
</dependency>
26+
<dependency>
27+
<groupId>com.google.protobuf</groupId>
28+
<artifactId>protobuf-java-util</artifactId>
29+
</dependency>
30+
----
31+
32+
NOTE: Without these dependencies, the gateway will throw a `NoClassDefFoundError` at runtime when the filter is invoked.
33+
634
The filter takes the following arguments:
735

836
* `service`: Short name of the service that handles the request.

0 commit comments

Comments
 (0)