You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/spring-cloud-gateway-server-webflux/gatewayfilter-factories/jsontogrpc-factory.adoc
+8-13Lines changed: 8 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,10 @@ The JSONToGRPC GatewayFilter Factory converts a JSON payload to a gRPC request.
5
5
6
6
The filter takes the following arguments:
7
7
8
+
* `service`: Short name of the service that handles the request.
9
+
10
+
* `method`: Method name in the service that handles the request.
11
+
8
12
* `protoDescriptor`: Proto descriptor file.
9
13
10
14
This file can be generated using `protoc` and specifying the `--descriptor_set_out` flag:
When a request is made through the gateway to `/json/hello`, the request is transformed by using the definition provided in `hello.proto`, sent to `HelloService/hello`, and the response back is transformed to JSON.
Copy file name to clipboardExpand all lines: spring-cloud-gateway-integration-tests/grpc/src/test/java/org/springframework/cloud/gateway/tests/grpc/JsonToGrpcApplicationTests.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ public void shouldConvertFromJSONToGRPC() {
Copy file name to clipboardExpand all lines: spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/factory/JsonToGrpcGatewayFilterFactory.java
Copy file name to clipboardExpand all lines: spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -284,15 +284,13 @@ public GatewayFilterSpec circuitBreaker(Consumer<SpringCloudCircuitBreakerFilter
284
284
285
285
/**
286
286
* A filter that transforms a JSON request into a gRPC one.
287
-
* @param protoDescriptor relative path to the proto descriptor file.
288
-
* @param protoFile relative path to the proto definition file.
289
287
* @param service fully qualified name of the service that will handle the request.
290
288
* @param method method name in the service that will handle the request.
289
+
* @param protoDescriptor relative path to the proto descriptor file.
0 commit comments