Skip to main content

Mini Project: Order Service Calling Inventory Service

Learn Mini Project: Order Service Calling Inventory Service (Microservices, Spring Boot) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Mini Real-Time Project: Order Service Calling Inventory Service Problem An order service must ask a separate inventory service whether an item is in stock. The call crosses the network, so the order service must also survive the inventory service being down. Requirements Start an inventory service as its own Spring Boot application on a free port. Call it from the order service with RestClient, passing a correlation id header. Stop the inventory service and show the order service falls back instead of crashing. Keep each service independent: no shared classes except the JSON shape. Concepts...

More lessons in Microservices