From 53920b73b4f6a13d669ae34ee5d4c458eb516048 Mon Sep 17 00:00:00 2001 From: Jacob Casper Date: Sat, 8 Jun 2024 20:01:34 -0500 Subject: [PATCH] Hello world project with working maven build toolchain --- .gitignore | 2 + pom.xml | 120 ++++++++++++++++++ .../java/com/jacobcasper/xivgraph/App.java | 11 ++ .../xivgraph/controllers/ApiController.java | 16 +++ .../controllers/StaticController.java | 20 +++ src/main/resources/templates/index.html | 10 ++ 6 files changed, 179 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/com/jacobcasper/xivgraph/App.java create mode 100644 src/main/java/com/jacobcasper/xivgraph/controllers/ApiController.java create mode 100644 src/main/java/com/jacobcasper/xivgraph/controllers/StaticController.java create mode 100644 src/main/resources/templates/index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d6c1194 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.swp +target/ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..d8bfe52 --- /dev/null +++ b/pom.xml @@ -0,0 +1,120 @@ + + + + 4.0.0 + + com.jacobcasper + xivgraph + 1.0-SNAPSHOT + + xivgraph + https://www.jacobcasper.com + + + UTF-8 + 22 + 22 + + + + + org.springframework.boot + spring-boot + 3.3.0 + + + org.springframework.boot + spring-boot-autoconfigure + 3.3.0 + + + org.springframework.boot + spring-boot-starter-thymeleaf + 3.3.0 + + + org.springframework.boot + spring-boot-starter-web + 3.3.0 + + + junit + junit + 4.11 + test + + + + + + + + maven-clean-plugin + + + maven-resources-plugin + + + maven-compiler-plugin + + + maven-surefire-plugin + + + maven-assembly-plugin + + + maven-deploy-plugin + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + maven-assembly-plugin + + + + true + com.jacobcasper.xivgraph.App + + + + jar-with-dependencies + + + + + make-assembly + package + + single + + + + + + maven-install-plugin + + + maven-dependency-plugin + + + analyze + package + + analyze-dep-mgt + + + true + + + + + + + diff --git a/src/main/java/com/jacobcasper/xivgraph/App.java b/src/main/java/com/jacobcasper/xivgraph/App.java new file mode 100644 index 0000000..2a718ea --- /dev/null +++ b/src/main/java/com/jacobcasper/xivgraph/App.java @@ -0,0 +1,11 @@ +package com.jacobcasper.xivgraph; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class App { + public static void main(String... args) { + SpringApplication.run(App.class, args); + } +} diff --git a/src/main/java/com/jacobcasper/xivgraph/controllers/ApiController.java b/src/main/java/com/jacobcasper/xivgraph/controllers/ApiController.java new file mode 100644 index 0000000..22edac6 --- /dev/null +++ b/src/main/java/com/jacobcasper/xivgraph/controllers/ApiController.java @@ -0,0 +1,16 @@ +package com.jacobcasper.xivgraph.controllers; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class ApiController { + + @GetMapping("/api") + public Response root() { + return new Response(); + } + + record Response() {} +} diff --git a/src/main/java/com/jacobcasper/xivgraph/controllers/StaticController.java b/src/main/java/com/jacobcasper/xivgraph/controllers/StaticController.java new file mode 100644 index 0000000..8d741aa --- /dev/null +++ b/src/main/java/com/jacobcasper/xivgraph/controllers/StaticController.java @@ -0,0 +1,20 @@ +package com.jacobcasper.xivgraph.controllers; + +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.servlet.view.RedirectView; + +@Controller +public class StaticController { + + @GetMapping("/") + public String root() { + return "index"; + } + + @GetMapping("/index") + public String index() { + return "index"; + } +} diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html new file mode 100644 index 0000000..ed16574 --- /dev/null +++ b/src/main/resources/templates/index.html @@ -0,0 +1,10 @@ + + + + XIV Raider Graph + + + +

+ + -- 2.20.1