Skip to content

Commit 66557f9

Browse files
author
jvmlet
committed
documentation + version 6 release
1 parent 0a44b6b commit 66557f9

File tree

2 files changed

+46
-3
lines changed

2 files changed

+46
-3
lines changed

README.adoc

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ If you are using protobuf version lower than `3.0.0`, please use `org.lognet:grp
3737
== Show case
3838
3939
In the 'grpc-spring-boot-starter-demo' project you can find fully functional example with integration test.
40+
41+
=== Service implementation
4042
The service definition from `.proto` file looks like this :
4143
[source,proto]
4244
----
@@ -62,10 +64,51 @@ All you need to do is to annotate your service implementation with `@org.lognet.
6264
}
6365
----
6466
67+
=== Interceptors support
68+
The starter supports the registration of two kinds of interceptors:
69+
70+
- Per service
71+
72+
[source,java]
73+
----
74+
@GRpcService(interceptors = { LogInterceptor.class })
75+
public class GreeterService extends GreeterGrpc.GreeterImplBase{
76+
// ommited
77+
}
78+
----
79+
`LogInterceptor` will be instantiated via spring factory if there is bean of type `LogInterceptor`, or via no-args constructor otherwise.
80+
81+
- Global
82+
83+
[source,java]
84+
----
85+
@GRpcGlobalInterceptor
86+
public class MyInterceptor implements ServerInterceptor{
87+
// ommited
88+
}
89+
----
90+
91+
92+
In both cases the interceptor has to implement `io.grpc.ServerInterceptor` interface.
93+
94+
The particular service also has the opportunity to disable the global interceptors :
95+
96+
[source,java]
97+
----
98+
@GRpcService(applyGlobalInterceptors = false)
99+
public class GreeterService extends GreeterGrpc.GreeterImplBase{
100+
// ommited
101+
}
102+
----
103+
104+
105+
106+
65107
== On the roadmap
66108
67-
* Customized gRPC server builder with compression/decompression registry, custom `Executor` service and transport security.
68-
* `ServerInterceptor` support.
109+
* Customized gRPC server builder with compression/decompression registry .
110+
* Custom `Executor` service.
111+
* Transport security.
69112
70113
== License
71114

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=0.0.6-SNAPSHOT
1+
version=0.0.6
22
group=org.lognet
33
description=Spring Boot starter for Google RPC.
44
gitHubUrl=https\://github.com/LogNet/grpc-spring-boot-starter

0 commit comments

Comments
 (0)