A compact hands-on tutorial (its simple rest assure). Two Spring Boot services register with Eureka and communicate using Feign (REST) and gRPC.
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.
- Java 17+
- Maven 3.8+
- docker & docker-compose (optional)
- grpcurl (optional)
microservices/
├── eureka-server/
├── order/ # feign client + grpc client
├── product/ # rest + grpc server
└── common-proto/ # hello.proto
git clone https://github.com/sumedhahire/spring-boot-eureka-simplified
./mvnw -pl eureka-service,order,product clean package -DskipTests
Eureka UI: http://localhost:8761
- 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
curl http://localhost:8080/hello/feign
# {"message":"Hello from service-b (rest)"}grpcurl -plaintext -d '{"name":"sumedh"}' localhost:9090 hello.HelloService/SayHello
# {"message":"Hello sumedh from gRPC"}Use labels: good first issue, enhancement, bug. Keep PRs small and reference the step affected.
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.