An API gateway built on Spring Framework and Spring Boot for routing and filtering HTTP requests in microservice setups.
grpc-ecosystem/grpc-spring
Spring Boot starter that runs gRPC servers and clients from annotations like @GrpcService and @GrpcClient, with no manual channel or server setup.
- Stars
- 3,709
- Forks
- 853
- Open issues
- 172
- Last commit
- 2 days ago
What is it?
grpc-spring is a Spring Boot starter for gRPC. It automatically configures and starts a gRPC server from classes annotated with @GrpcService, and creates and manages gRPC channels and stubs for fields annotated with @GrpcClient. Server and client settings are controlled through Spring's standard property mechanism, using the grpc.server and grpc.client prefixes.
The library is built on grpc-java and works with any BindableService-based implementation on the server side. Client-side support for other flavors such as Reactive gRPC or grpc-kotlin requires custom StubFactory implementations. It also integrates with Spring Security, Spring Cloud service discovery (Consul, Eureka, Nacos), Spring Sleuth tracing via Brave, global and custom interceptors, and micrometer/actuator metrics.
Separate server and client starters are published alongside the combined starter, and the project can be used without Spring Boot with some manual bean configuration.
Key features
- 01Runs a gRPC server automatically from @GrpcService implementations.
- 02Creates and manages gRPC channels and stubs with @GrpcClient.
- 03Integrates with Spring Cloud discovery such as Consul, Eureka and Nacos.
- 04Supports global and custom gRPC server and client interceptors.
- 05Provides metrics through micrometer and actuator.
Use cases
- Adding gRPC services to an existing Spring Boot application.
- Calling other gRPC microservices from Spring-based code using discovered addresses.
- Adding authentication or tracing to gRPC calls via Spring Security or interceptors.
In collections
Topics
FAQ
- What is grpc-spring?
- Spring Boot starter that runs gRPC servers and clients from annotations like @GrpcService and @GrpcClient, with no manual channel or server setup. grpc-spring is a Spring Boot starter for gRPC. It automatically configures and starts a gRPC server from classes annotated with @GrpcService, and creates and manages gRPC channels and stubs for fields annotated with @GrpcClient. Server and client settings are controlled through Spring's standard property mechanism, using the grpc.server and grpc.client prefixes.
- Is grpc-spring free to use? What license does it have?
- grpc-spring is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is grpc-spring still maintained?
- Actively maintained. The last commit to grpc-spring was on Nov 4, 2026.
- What can I use grpc-spring for?
- Adding gRPC services to an existing Spring Boot application. Calling other gRPC microservices from Spring-based code using discovered addresses. Adding authentication or tracing to gRPC calls via Spring Security or interceptors.
- Where can I get grpc-spring?
- The source code and installation instructions are on GitHub: https://github.com/grpc-ecosystem/grpc-spring
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Kubernetes implementations of Spring Cloud interfaces, letting Spring Cloud apps use Kubernetes for service discovery and configuration.
Java implementation of Apache Dubbo, an RPC and microservice framework for building service communication, discovery and traffic management.
A Spring Cloud implementation that integrates Spring Cloud applications with Tencent's Polaris for service discovery and governance.
Web-based admin dashboard for monitoring and managing Spring Boot applications through their Actuator endpoints.
A Java-based API gateway for service proxying, protocol conversion, and API governance, with a plugin chain and a central Admin console.