Skip to content

perusworld/spring-cloud-starter

Repository files navigation

spring-cloud-starter

Spring Cloud Starter

Development

Startup Core Services Before Dev

mvn clean package -Dmaven.test.skip=true
cd docker
docker-compose -f core-services-docker-compose.yml build
docker-compose -f core-services-docker-compose.yml up -d
docker-compose -f service-routing-docker-compose.yml build
docker-compose -f service-routing-docker-compose.yml up -d

Stop Core Services

cd docker
docker-compose -f service-routing-docker-compose.yml stop
docker-compose -f core-services-docker-compose.yml stop

Test

mvn compile test

Startup Backend Services During UI Dev

mvn package
cd docker
docker-compose -f services-docker-compose.yml build
docker-compose -f services-docker-compose.yml up -d

Stop Backend Services During UI Dev

cd docker
docker-compose -f services-docker-compose.yml stop

Startup Web

mvn package
cd docker
docker-compose -f web-docker-compose.yml build
docker-compose -f web-docker-compose.yml up -d

Stop Web

cd docker
docker-compose -f web-docker-compose.yml stop

Dev Instance URLs

Service URL UID/PWD Health URL via Gateway
Rabbit MQ http://localhost:15672/ guest/guest
Postgres Admin http://localhost:5431 user@db.com/pwd
Mongo Admin http://localhost:27016
Service Registry http://localhost:8761
Service Gateway http://localhost:8080 http://localhost:9080/actuator/health
Sample REST Service http://localhost:8081/ http://localhost:9081/actuator/health http://localhost:8080/sample-rest-service/
Sample AMQP Service http://localhost:9083/actuator/health
Sample Spring Web http://localhost:8082/ http://localhost:9082/actuator/health http://localhost:8080/sample-spring-web/

Documentation

html version, pdf version, postman collection, insomnia collection, swagger

Generate Documentation

Requires wkhtmltopdf, jq, restdocs-to-postman, swaggymnia

mvn clean package
cd  documentation/sample-rest-service
cp ../../sample-rest-service/target/generated-docs/index.html .
wkhtmltopdf index.html index.pdf
cd ../../sample-rest-service/target
restdocs-to-postman --input generated-snippets --export-format postman --determine-folder secondLastFolder --replacements ../../documentation/config/replacements.json --output ../../documentation/sample-rest-service/postman-collection.json
restdocs-to-postman --input generated-snippets --export-format insomnia --determine-folder secondLastFolder --replacements ../../documentation/config/replacements.json --output ../../documentation/sample-rest-service/insomnia-collection.json
cd  ../../documentation/sample-rest-service
jq '.info.name="Sample REST Service - Postman"' postman-collection.json > postman-collection.tmp
jq '.item[0].name="Sample Requests"' postman-collection.tmp > postman-collection.json
rm postman-collection.tmp
jq '.resources[0].name="Sample REST Service - Insomnia Sample Requests"' insomnia-collection.json > insomnia-collection.tmp
mv insomnia-collection.tmp insomnia-collection.json
swaggymnia generate -insomnia insomnia-collection.json -config ../config/swaggymnia.json -output json
cd  ../../