commit 3b2673414ce027f975cd8d83698e29d4250915e5 Author: Nana Date: Wed Oct 28 19:33:26 2020 +0100 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c2d52b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/* diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..5c6aa94 --- /dev/null +++ b/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + com.example + java-maven-app + 1.0-SNAPSHOT + + + + org.springframework.boot + spring-boot-starter-web + 2.3.4.RELEASE + + + + junit + junit + 4.13.1 + test + + + + net.logstash.logback + logstash-logback-encoder + 6.4 + + + + diff --git a/src/main/java/com/example/Application.java b/src/main/java/com/example/Application.java new file mode 100644 index 0000000..6f55691 --- /dev/null +++ b/src/main/java/com/example/Application.java @@ -0,0 +1,27 @@ +package com.example; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import javax.annotation.PostConstruct; + +@SpringBootApplication +public class Application { + + public static void main(String[] args) + { + SpringApplication.run(Application.class, args); + } + + @PostConstruct + public void init() + { + Logger log = LoggerFactory.getLogger(Application.class); + log.info("Java app started"); + } + + public String getStatus() { + return "OK"; + } +}