Skip to content

Commit 0f4790e

Browse files
committed
Merge pull request #50863 from SimonVerhoeven
Closes gh-50863 * gh-50863: Polish "Fix typos and grammatical errors in gRPC documentation" Fix typos and grammatical errors in gRPC documentation
2 parents 7b1e61a + 64940c8 commit 0f4790e

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

  • documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/io

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/io/grpc.adoc

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
= gRPC
33

44
Google Remote Procedure Call (gRPC) is a high-performance RPC framework that enables client-server communication using binary messages.
5-
Spring Boot include support for developing and testing both client and server gRPC applications.
5+
Spring Boot includes support for developing and testing both client and server gRPC applications.
66

7-
The underling message format used by gRPC is Protocol Buffers which allow messages to be created and consumed by a wide variety of programming languages.
7+
The underlying message format used by gRPC is Protocol Buffers, which allow messages to be created and consumed by a wide variety of programming languages.
88

99

1010

1111
[[io.grpc.servicedefinitions]]
1212
== Service Definitions
1313

14-
To develop a gRPC application you first need a Protocol Buffers service definition file.
14+
To develop a gRPC application, you first need a Protocol Buffers service definition file.
1515
A `.proto` file defines the services and messages that your application can consume or provide.
1616

1717
Here's an example of a typical `.proto` file that uses https://protobuf.dev/programming-guides/proto3/[the `proto3` revision] of the protocol buffers language:
@@ -36,29 +36,29 @@ message HelloReply {
3636
}
3737
----
3838

39-
This file defines a `HelloWorld` service with a single method that accepts a `HelloReqest` message and return a `HelloReply` message.
40-
The `HelloReqest` message contains a `name` string field.
39+
This file defines a `HelloWorld` service with a single method that accepts a `HelloRequest` message and returns a `HelloReply` message.
40+
The `HelloRequest` message contains a `name` string field.
4141
The `HelloReply` message contains a `message` string field.
4242

43-
With the exception of a the `java_package` and `java_multiple_files` options, there is nothing in the `.proto` file that is specific to the Java programming langage.
43+
With the exception of the `java_package` and `java_multiple_files` options, there is nothing in the `.proto` file that is specific to the Java programming language.
4444

4545

4646

4747
[[io.grpc.servicedefinitions.generatingjavacode]]
4848
=== Generating Java Code
4949

5050
Since `.proto` files are language agnostic, we need a process to convert them into usable Java code.
51-
We can then use the generated code to either make a remote procedure call to running service, or implement the service ourselves so that others may call it.
51+
We can then use the generated code to either make a remote procedure call to a running service or implement the service ourselves so that others may call it.
5252

5353
The exact process you use to generate code will depend on your build system.
54-
Spring Boot supports for both Maven and Gradle protobuf plugins, but you are free to use whatever solution works best for you.
54+
Spring Boot supports both Maven and Gradle protobuf plugins, but you are free to use whatever solution works best for you.
5555

5656

5757

5858
[[io.grpc.servicedefinitions.generatingjavacode.maven]]
5959
==== Using the Maven Plugin
6060

61-
Spring Boot include dependency management for the `io.github.ascopes:protobuf-maven-plugin` Maven plugin.
61+
Spring Boot includes dependency management for the `io.github.ascopes:protobuf-maven-plugin` Maven plugin.
6262
If you are using the `spring-boot-starter-parent` POM, you'll also get sensible out-of-the-box configuration.
6363

6464
The following shows a typical Maven POM file that uses the plugin:
@@ -131,7 +131,7 @@ If you use Spring Boot's dependency management the `${protobuf-java.version}` an
131131
[[io.grpc.servicedefinitions.generatingjavacode.gradle]]
132132
==== Using the Gradle Plugin
133133

134-
Spring Boot include dependency management for the `com.google.protobuf:protobuf-gradle-plugin` Gradle plugin.
134+
Spring Boot includes dependency management for the `com.google.protobuf:protobuf-gradle-plugin` Gradle plugin.
135135
In addition, the `spring-boot-gradle-plugin` will react to the presence of the protobuf plugin and configure it appropriately.
136136

137137
The following shows a typical Gradle file that uses the plugin:
@@ -163,7 +163,7 @@ endif::[]
163163
}
164164
----
165165

166-
Since this gradle file uses both the `org.springframework.boot` and `com.google.protobuf` plugins, you'll get the following:
166+
Since this Gradle file uses both the `org.springframework.boot` and `com.google.protobuf` plugins, you'll get the following:
167167

168168
* Configuration of the `protoc` version.
169169
* Configuration of the `protoc-gen-grpc-java` version.
@@ -179,11 +179,11 @@ TIP: If you don't use `org.springframework.boot` plugin, or you want to configur
179179

180180
Spring Boot provides a `spring-boot-grpc-server` module and a `spring-boot-starter-grpc-server` starter POM that you can use for server applications.
181181

182-
In order to write the actual server code, you'll need to extended one or more of base classes generated from your `.proto` file and expose them as Spring beans.
182+
In order to write the actual server code, you'll need to extend one or more of the base classes generated from your `.proto` file and expose them as Spring beans.
183183
Spring gRPC will automatically expose any bean that implements javadoc:io.grpc.BindableService[] as a gRPC server.
184184
Since all `.proto` generated classes implement javadoc:io.grpc.BindableService[], adding them as beans is enough to expose them over gRPC.
185185

186-
TIP: For more details see {url-spring-grpc-docs}/server.html#_create_a_grpc_service[the Spring gRPC documentation].
186+
TIP: For more details, see {url-spring-grpc-docs}/server.html#_create_a_grpc_service[the Spring gRPC documentation].
187187

188188
The following example shows how the `HelloWorld` service from the `.proto` file above could be implemented.
189189
In this example, we're using the javadoc:org.springframework.grpc.server.service.GrpcService[format=annotation] annotation and assuming that the code is in a package that will be picked up by component scanning:
@@ -213,7 +213,7 @@ $ grpcurl -d '{"name":"Spring"}' -plaintext localhost:9090 HelloWorld.SayHello
213213

214214
If you find that the version of Netty provided by the `spring-boot-starter-grpc-server` starter POM isn't compatible with other libraries you use, you can switch to a "`shaded`" version.
215215

216-
To switch, you can excluded `io.grpc:grpc-netty` and include `io.grpc:grpc-netty-shaded`.
216+
To switch, you can exclude `io.grpc:grpc-netty` and include `io.grpc:grpc-netty-shaded`.
217217
For example:
218218

219219

@@ -317,10 +317,10 @@ dependencies {
317317
+
318318
======
319319

320-
TIP: Remember to include a Servlet Container dependency, for example using `spring-boot-starter-tomcat`, and to set `server.http2.enabled` to `true`.
320+
TIP: Remember to include a Servlet Container dependency`spring-boot-starter-tomcat`, for example – and to set configprop:server.http2.enabled[] to `true`.
321321

322322
NOTE: When using a servlet container, certain gRPC server configuration properties are not relevant and will be ignored.
323-
For example, configprop:spring.grpc.server.port[] is ignored since configprop:server.port[] used used to set a web server port.
323+
For example, configprop:spring.grpc.server.port[] is ignored since configprop:server.port[] is used to set a web server port.
324324

325325

326326

@@ -343,7 +343,7 @@ spring:
343343

344344
Client authentication can also be configured by setting configprop:spring.grpc.server.ssl.client-auth[] to `optional` or `require`.
345345

346-
TIP: To temporarily disable server SSL support, for example to aid with testing, you can set configprop:spring.grpc.server.ssl.enabled[] to `false`.
346+
TIP: To temporarily disable server SSL supportto aid with testing, for example – set configprop:spring.grpc.server.ssl.enabled[] to `false`.
347347

348348

349349

@@ -604,7 +604,7 @@ You can configure gRPC connections to use standard one-way-TLS, or mutual TLS
604604
==== Standard one-way TLS
605605

606606
To use standard one-way TLS, you can set the `ssl.enabled` property to `true` in your channel properties.
607-
For example, the following will enabled an SSL/TLS connection for the `myservice` channel:
607+
For example, the following will enable an SSL/TLS connection for the `myservice` channel:
608608

609609
[configprops,yaml]
610610
----
@@ -643,7 +643,7 @@ spring:
643643

644644
[TIP]
645645
====
646-
To temporarily disable client SSL support, for example to aid with testing, you can set `bypass-certificate-validation` to `true` on your channel config:
646+
To temporarily disable client SSL supportto aid with testing, for example – set `bypass-certificate-validation` to `true` on your channel config:
647647
648648
[configprops,yaml]
649649
----
@@ -667,7 +667,7 @@ In this mode, the in-process channel factory is auto-configured in addition to t
667667
To prevent users from having to deal with multiple channel factories, a composite channel factory is configured as the primary channel factory bean.
668668
The composite consults its composed factories to find the first one that supports the channel target.
669669

670-
To use the in-process server the channel target must be set to `in-process:<name>`
670+
To use the in-process server, the channel target must be set to `in-process:<name>`
671671

672672
TIP: To disable the in-process channel factory, you can set the configprop:spring.grpc.client.inprocess.enabled[] property to `false`.
673673

@@ -700,14 +700,14 @@ include-code::MyGrpcConfiguration[]
700700
[[io.grpc.testing]]
701701
== Testing gRPC Applications
702702

703-
To help test your gRPC client and server applications you can use the `spring-boot-grpc-test` module or the `spring-boot-starter-grpc-client-test` / `spring-boot-starter-grpc-server-test` starter POMs.
703+
To help test your gRPC client and server applications, you can use the `spring-boot-grpc-test` module or the `spring-boot-starter-grpc-client-test` / `spring-boot-starter-grpc-server-test` starter POMs.
704704

705705

706706
[[io.grpc.testing.test-transport]]
707707
=== Using In-Process Test Transport
708708

709709
The javadoc:org.springframework.boot.grpc.test.autoconfigure.AutoConfigureTestGrpcTransport[format=annotation] annotation allows you to quickly replace gRPC communication channels with in-process channels specifically designed for testing.
710-
Unlike regular in-process channels, these test channels to not require any configuration.
710+
Unlike regular in-process channels, these test channels do not require any configuration.
711711

712712
Using test gRPC transport means that you don't need to actually listen on a network port to start your application.
713713
This allows your tests to run quickly, whilst still ensuring that your application works as expected.
@@ -740,4 +740,4 @@ include-code::MyGrpcIntegrationTests[]
740740

741741

742742

743-
// FIXME https://github.com/spring-projects/spring-grpc/issues/397
743+
// FIXME https://github.com/spring-projects/spring-grpc/issues/397

0 commit comments

Comments
 (0)