Skip to content

Latest commit

 

History

History
70 lines (60 loc) · 2.28 KB

README.md

File metadata and controls

70 lines (60 loc) · 2.28 KB

Simple Spring Boot demo

This is simple spring-boot application demo. Spring Cloud Sleuth is enabled in this demo to improve log traceability.

Rest Endpoints

OpenAPI v3 docs and Swagger UI

Actuator endpoints

Static Resources

Build and run

gradle clean build test
java -jar build/libs/spring-demo-1.0.0-SNAPSHOT.jar

Build Docker Image

Docker files for x86_64 and ARM aarch64 architectures are available. This example shows how to build docker image for x86_64 architecture.

export ARCH=amd64
export VERSION=1.0.4
#export ARCH=arm64v8
docker build -t jurajveverka/spring-demo:${VERSION} .
docker push jurajveverka/spring-demo:${VERSION}
docker run -p 8081:8081 -d jurajveverka/spring-demo:${VERSION} -n spring-demo
docker exec -ti spring-demo /bin/bash

Run with Docker

docker run -p 8081:8081 jurajveverka/spring-demo:${VERSION}

Run with Docker Swarm

sudo docker stack deploy -c spring-demo-swarm.yml spring-demo
sudo docker stack services spring-demo
sudo docker stack rm spring-demo

LogBack configuration