This is a sample microservice application for classic "customer orders product" use case.
Each microservice is developed using spring boot.
Spring boot application is dockerized.
Application is deployed in kubernetes.
. |-- customer-service |-- order-service |-- product-service |-- first-service `-- second-service
To demonstrate calling one service from another within kubertentes second-service calls first-service:
. |-- first-service `-- second-service
. |-- Dockerfile |-- README.md |-- build.gradle |-- deployment | `-- kubernetes | |-- commands.sh | |-- configmap.yaml | |-- deployment.yaml | |-- ingress.yaml | `-- service.yaml |-- gradle | `-- wrapper | |-- gradle-wrapper.jar | `-- gradle-wrapper.properties |-- gradlew |-- gradlew.bat |-- manifest.yml |-- mvnw |-- mvnw.cmd |-- pom.xml |-- resource | |-- application.properties | |-- bootstrap.properties | `-- customer-service.yaml `-- src |-- main | `-- java | `-- com | `-- nayank | |-- a | | `-- launcher | | `-- Application.java | |-- b | | `-- controller | | |-- CustomerApiController.java | | `-- GreetingController.java | |-- c | | `-- restresource | | `-- Greeting.java | |-- d | | `-- service | | |-- AddCutomerRequestProcessor.java | | |-- CustomerApiService.java | | |-- CustomerApiServiceImpl.java | | |-- DeleteCutomerRequestProcessor.java | | `-- GenericServiceTemplate.java | |-- f | | `-- persistance | | |-- Address.java | | |-- Customer.java | | `-- CustomerRepository.java | `-- g | `-- logging | `-- LoggingAspect.java `-- test `-- java `-- com `-- nayank `-- b `-- controller |-- CustomerApiControllerTest.java `-- GreetingControllerTest.java
. |-- Dockerfile |-- README.md |-- build.gradle |-- deployment | `-- kubernetes | |-- commands.sh | |-- configmap.yaml | |-- deployment.yaml | |-- ingress.yaml | `-- service.yaml |-- gradle | `-- wrapper | |-- gradle-wrapper.jar | `-- gradle-wrapper.properties |-- gradlew |-- gradlew.bat |-- manifest.yml |-- mvnw |-- mvnw.cmd |-- pom.xml |-- resource | |-- application.properties | |-- bootstrap.properties | `-- order-service.yaml `-- src |-- main | `-- java | `-- com | `-- nayank | |-- a | | `-- launcher | | `-- Application.java | |-- b | | `-- controller | | |-- GreetingController.java | | `-- OrderApiController.java | |-- c | | `-- restresource | | `-- Greeting.java | |-- d | | `-- service | | `-- GenericServiceTemplate.java | `-- g | `-- logging | `-- LoggingAspect.java `-- test `-- java `-- com `-- nayank `-- b `-- controller `-- GreetingControllerTests.java
. |-- Dockerfile |-- README.md |-- build.gradle |-- deployment | `-- kubernetes | |-- commands.sh | |-- configmap.yaml | |-- deployment.yaml | |-- ingress.yaml | `-- service.yaml |-- gradle | `-- wrapper | |-- gradle-wrapper.jar | `-- gradle-wrapper.properties |-- gradlew |-- gradlew.bat |-- manifest.yml |-- mvnw |-- mvnw.cmd |-- pom.xml |-- resource | |-- application.properties | |-- bootstrap.properties | `-- product-service.yaml `-- src |-- main | `-- java | `-- com | `-- nayank | |-- a | | `-- launcher | | `-- Application.java | |-- b | | `-- controller | | |-- GreetingController.java | | `-- ProductApiController.java | |-- c | | `-- restresource | | `-- Greeting.java | |-- d | | `-- service | | `-- GenericServiceTemplate.java | |-- f | | `-- persistance | | |-- Address.java | | |-- Customer.java | | `-- CustomerRepository.java | `-- g | `-- logging | `-- LoggingAspect.java `-- test `-- java `-- com `-- nayank `-- b `-- controller `-- GreetingControllerTests.java