https://github.com/sumedhahire/spring-boot-eureka-grpc-feign-simplified
Spring Boot tutorial: bidirectional microservices using Eureka, Feign, gRPC, and Hibernate.
https://github.com/sumedhahire/spring-boot-eureka-grpc-feign-simplified
eureka-client eureka-discovery-service eureka-server feign feign-client-example grpc hibernate-jpa intellij java lombak maven microservices-architecture pom spring-boot spring-mvc
Last synced: 10 months ago
JSON representation
Spring Boot tutorial: bidirectional microservices using Eureka, Feign, gRPC, and Hibernate.
- Host: GitHub
- URL: https://github.com/sumedhahire/spring-boot-eureka-grpc-feign-simplified
- Owner: sumedhahire
- License: mit
- Created: 2025-09-29T04:06:10.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-09-30T05:32:38.000Z (10 months ago)
- Last Synced: 2025-09-30T07:16:30.377Z (10 months ago)
- Topics: eureka-client, eureka-discovery-service, eureka-server, feign, feign-client-example, grpc, hibernate-jpa, intellij, java, lombak, maven, microservices-architecture, pom, spring-boot, spring-mvc
- Language: Java
- Homepage: https://www.sumedhahire.info
- Size: 25.4 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
springboot-microservices-eureka-grpc-feign-tutorial
A compact hands-on tutorial (its simple rest assure). Two Spring Boot services register with Eureka and communicate using Feign (REST) and gRPC.
Table of contents
Overview
Notes on modules:
Notes on modules:
-
common-lib: Shared models used by both gRPC and Feign clients for type consistency. -
order: Provides REST and gRPC endpoints; also consumes endpoints from product. -
product: Provides REST and gRPC endpoints; also consumes endpoints from order. -
eureka-server: Handles service registration and discovery, enabling both applications to find each other dynamically.
This design allows bidirectional communication between order and product via Feign (REST) and gRPC, with all shared data models maintained in common-lib.
Prerequisites
- Java 17+
- Maven 3.8+
- docker & docker-compose (optional)
- grpcurl (optional)
Repo structure
microservices/
├── eureka-server/
├── order/ # feign client + grpc client
├── product/ # rest + grpc server
└── common-proto/ # hello.proto
Quickstart (one-command)
git clone https://github.com/sumedhahire/spring-boot-eureka-simplified
./mvnw -pl eureka-service,order,product clean package -DskipTests
Eureka UI: http://localhost:8761
Run manually
- Start Eureka:
cd eureka-server
./mvnw spring-boot:run
- Start service-b (provider):
cd ../product
./mvnw spring-boot:run
- Start service-a (consumer):
cd ../order
./mvnw spring-boot:run
Test examples
Feign (REST)
curl http://localhost:8080/hello/feign
# {"message":"Hello from service-b (rest)"}
gRPC
grpcurl -plaintext -d '{"name":"sumedh"}' localhost:9090 hello.HelloService/SayHello
# {"message":"Hello sumedh from gRPC"}
Contributing
Use labels: good first issue, enhancement, bug. Keep PRs small and reference the step affected.
License
MIT. See LICENSE.
Notes
GitHub strips <style> and many attributes. This HTML uses supported tags only so it renders inside README.md. For a full HTML/CSS page host it via GitHub Pages and put the file in /docs or use the gh-pages branch.