Skip to content

Commit

Permalink
Add note on local.grpc.port
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyer committed Jan 15, 2025
1 parent 4efd23a commit 4779cae
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels, @LocalGrpcPort i
}
----

The channel can be configured via `application.properties` as well, by using the ``${local.grpc.port}` property placeholder.
The `@Bean` where you create the stub must still be `@Lazy` for the same reason as above.
For example:

[source,properties]
----
spring.grpc.client.channels.local.address=0.0.0.0:${local.grpc.port}
----

[[client-interceptor]]
== Client Interceptors

Expand Down

0 comments on commit 4779cae

Please sign in to comment.