grpc-ecosystem / grpc-ecosystem/grpc-spring
@GrpcAdvice for specific classes only
- Dominant language
- Java
- Stars
- 3.7k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Description
**The context**
We want to have one `@GrpcAdvice` for one grpc endpoint.
**The question**
Is it possible to have one `@GrpcAdvice` for one class that extends a grpc service `public class GrpcBonusController extends BonusServiceGrpc.BonusServiceImplBase {}`
Which versions do you use?
* Spring (boot): 2.5.6
* grpc-java: @latest
* grpc-spring-boot-starter: @latest
* java: version + architecture (64bit?) JDK 17, 64 Bit OS
* Other relevant libraries... none
**Additional information**
In **spring-boot-starter-web** we can do
```
@ControllerAdvice(annotations = PragmaticRestController.class)
public class PragmaticControllerAdvice {}
@PragmaticRestController
public class PragmaticController {}
```
and then this `@ControllerAdvice` will only listen for the `@RestController` that is annotated with this annotation.
Can we do the same here?
Contributor guide
Assessment
This issue has not been assessed yet.