Coder Social home page Coder Social logo

easonlai / serving-web-content-demo Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 59 KB

Java Spring Boot web content with logback (logback-spring) logging configuration demo repo.

Java 92.76% Dockerfile 7.24%
java javaspringboot logging logback logback-spring containerization

serving-web-content-demo's Introduction

Java Spring Boot Web Content with logback (logback-spring) Logging Configuration Demo Repo

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

With Java Spring Boot Build-in Logging

/src/main/resources/application.properties

With Logback (logback-spring) Logging

  • Logging format = Datetime, Host IP, Process ID, Log Level, Java Class for Logging, Client IP, Message for Logging
/src/main/resources/logback-spring.xml

Build with Maven

mvn clean package

Run locally

java -jar target/serving-web-content-demo-0.0.1.jar

Test web app locally

http://localhost:8080

Containerize

  1. Build a docker image using Dockerfile:
    docker build -t serving-web-content-demo .
    
  2. Run docker image locally
    docker run --rm -p 8080:8080 serving-web-content-demo
    
  3. Then you can access the web app at http://localhost:8080 in browser.

Deploy to K8S

kubectl apply -f serving-web-content-demo-aks.yaml

serving-web-content-demo's People

Contributors

easonlai avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

vijax naheedmk

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.