Spring / Spring gRPC Interview Questions
How do you enable gRPC server reflection in Spring Boot, and why would you?
Reflection is enabled by adding the grpc-services dependency and turning on the reflection service, e.g. with the community starter: grpc.server.reflection-service-enabled=true.
Once enabled, tools such as grpcurl or Postman's gRPC support can query the running server to discover which services and methods it exposes, without needing a local copy of the .proto file. This is primarily a development and debugging aid - being able to explore and invoke a gRPC service ad hoc is the rough equivalent of hitting a REST endpoint with curl when you don't have generated client code handy. Many teams disable it in production for the same reason they might restrict introspection on a public API.
More Related questions...