There are two ways to run the entire application:
- On Local Machine
- Using Docker
Running it all local is simple, do the following in sequence, in four different terminal windows:
cd sample-eureka
../mvnw spring-boot:runcd sample-config
../mvnw spring-boot:runcd sample-pong
../mvnw spring-boot:runand test with:
curl -v -X POST \
-H "Content-type: application/json" \
-H "Accept: application/json" \
http://localhost:8082/message \
-d '{
"id": "test",
"payload": "hello"
}'cd sample-gateway
../mvnw spring-boot:runand test with:
curl -v -X POST \
-H "Content-type: application/json" \
-H "Accept: application/json" \
http://localhost:8082/message \
-d '{
"id": "test",
"payload": "hello"
}'cd sample-ping
../mvnw spring-boot:runIf all the applications have come up cleanly, the endpoint should be available at http://localhost:8080
Running using Docker is even simpler, assuming that docker-compose and docker are installed on your box, just run the following:
mvn clean package docker:builddocker-compose upThat is it, the endpoint should be available at http://dockerhost:8080