From 3b2673414ce027f975cd8d83698e29d4250915e5 Mon Sep 17 00:00:00 2001 From: Nana Date: Wed, 28 Oct 2020 19:33:26 +0100 Subject: [PATCH] Initial commit --- .gitignore | 1 + pom.xml | 32 ++++++++++++++++++++++ src/main/java/com/example/Application.java | 27 ++++++++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/com/example/Application.java 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"; + } +}