Skip to content

Commit 596087e

Browse files
author
Alexander Furer
committed
documentation
1 parent 28a27cd commit 596087e

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.adoc

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
= Spring boot starter for http://www.grpc.io/[gRPC framework.] https://bintray.com/lognet/maven/grpc-spring-boot-starter/_latestVersion[ image:https://api.bintray.com/packages/lognet/maven/grpc-spring-boot-starter/images/download.svg[Download]] image:https://travis-ci.org/LogNet/grpc-spring-boot-starter.svg?branch=master[Build Status,link=https://travis-ci.org/LogNet/grpc-spring-boot-starter] image:https://codecov.io/gh/LogNet/grpc-spring-boot-starter/branch/master/graph/badge.svg["Codecov", link="https://codecov.io/gh/LogNet/grpc-spring-boot-starter/branch/master"] https://bintray.com/lognet/maven/grpc-spring-boot-starter?source=watch[ image:https://www.bintray.com/docs/images/bintray_badge_color.png[]]
22
:toc:
3+
:source-highlighter: prettify
4+
:numbered:
5+
:icons: font
36
47
58
== Features
@@ -25,12 +28,29 @@ dependencies {
2528
* Start by https://github.com/google/protobuf-gradle-plugin[generating] stub and server interface(s) from your `.proto` file(s).
2629
* Annotate your server interface implementation(s) with `@org.lognet.springboot.grpc.GRpcService`
2730
* Optionally configure the server port in your `application.yml/properties`. Default port is `6565`
31+
2832
[source,yaml]
2933
----
3034
grpc:
31-
port : 6565
35+
port: 6565
3236
----
3337
38+
The starter supports also the `in-process server`, which should be used for testing purposes :
39+
40+
[source,yaml]
41+
----
42+
grpc:
43+
enabled: false <1>
44+
inProcessServerName: myTestServer <2>
45+
----
46+
<1> Disables the default server (`NettyServer`).
47+
<2> Enables the in-process server.
48+
49+
[NOTE]
50+
If you enable both the `NettyServer` and `in-process` server, they will both share the same instance of `HealthStatusManager` and `GRpcServerBuilderConfigurer` (see <<Custom gRPC Server Configuration>>).
51+
52+
53+
3454
== Show case
3555
3656
In the 'grpc-spring-boot-starter-demo' project you can find fully functional example with integration test.
@@ -159,6 +179,10 @@ public class MyGRpcServerBuilderConfigurer extends GRpcServerBuilderConfigurer()
159179
}
160180
----
161181

182+
[NOTE]
183+
If you enable both `NettyServer` and `in-process` servers, the `configure` method will be invoked on the same instance og configurer.
184+
If you need to differentiate between the passed `serverBuilder`s, you can check the type. This is the current limitation.
185+
162186
== Eureka Integration
163187

164188
When building production-ready services, the advise is to have separate project for your service(s) gRPC API that holds only proto-generated classes both for server and client side usage. +

0 commit comments

Comments
 (0)