grpc-spring
grpc-spring copied to clipboard
Optional interceptors in @GrpcService annotation
Hi! I'm trying to use this starter and I have next problem. I have a ServerInterceptor, that depends on other optional bean (wich enabled through configuration). I need that interceptor only for one service, not global (for global it is easy make with ConditionalOnBean).
Maybe it will be good to add some property (e.g. "required") to @GrpcService annotation to allow to specify optional interceptors? And if there are no bean in app context, then don't fail with error, but just not register it. Now as I understand, I can do this only manually register service through GrpcServerConfigurer.
Sounds like a good idea.