Spring gRPC reference documentation covering server, client, security, and configuration
92
Pending
Does it follow best practices?
Impact
92%
2.19xAverage score across 3 eval scenarios
Pending
The risk profile of this skill
Your team is building an order management microservice using Spring Boot and gRPC. The service exposes three RPC methods: PlaceOrder, CancelOrder, and GetOrderStatus. The ops team has requested that every incoming gRPC call be logged (including the method name and caller identity), and that a separate rate-limiting check be applied only to PlaceOrder calls — without cluttering the service implementation itself.
Additionally, certain domain exceptions (such as OrderNotFoundException and InsufficientInventoryException) are currently leaking as raw gRPC UNKNOWN statuses to clients. The team wants these translated into proper gRPC status codes (NOT_FOUND and RESOURCE_EXHAUSTED respectively) through a centralized mechanism rather than try/catch blocks scattered across service methods.
The logging interceptor should run before the rate limiter. The rate limiter only applies to the PlaceOrder service, but should still participate in the same ordering framework as the global interceptors.
Produce a self-contained Maven project (no need to be compilable — focus on the configuration and wiring code) with the following files:
pom.xml — project dependencies including Spring gRPC BOM and necessary gRPC artifactssrc/main/java/.../OrderServiceImpl.java — gRPC service implementation (stub logic is fine)src/main/java/.../LoggingInterceptor.java — the global logging interceptor beansrc/main/java/.../RateLimitInterceptor.java — the per-service rate limiting interceptorsrc/main/java/.../OrderExceptionHandler.java — centralized exception handlersrc/main/java/.../GrpcConfig.java — Spring configuration class wiring interceptors, exception handler, and any other beanssrc/main/resources/application.properties — server configurationProvide a notes.md file explaining the key design decisions made in the configuration.
evals