This is demo repo to demostrate how to work with build-in & logback (logback-spring) logging in Java Spring Boot web. Logging will output to STROUT and log path (/logs/log.log). This repo also contain containerization materials for futher deployment in Kubernetes (K8S) cluster (e.g Azure Kubernetes Service (AKS)).
Readme update 1.0
/src/main/resources/application.properties
- Logging format = Datetime, Host IP, Process ID, Log Level, Java Class for Logging, Client IP, Message for Logging
/src/main/resources/logback-spring.xml
mvn clean package
java -jar target/serving-web-content-demo-0.0.1.jar
http://localhost:8080
- Build a docker image using
Dockerfile
:docker build -t serving-web-content-demo .
- Run docker image locally
docker run --rm -p 8080:8080 serving-web-content-demo
- Then you can access the web app at http://localhost:8080 in browser.
kubectl apply -f serving-web-content-demo-aks.yaml