Refactor to multi-module project for backend client
authorJacob Casper <dev@jacobcasper.com>
Sun, 9 Jun 2024 23:41:45 +0000 (18:41 -0500)
committerJacob Casper <dev@jacobcasper.com>
Sun, 9 Jun 2024 23:41:45 +0000 (18:41 -0500)
fflogsclient/pom.xml [new file with mode: 0644]
pom.xml
src/main/java/com/jacobcasper/xivgraph/App.java [deleted file]
src/main/java/com/jacobcasper/xivgraph/controllers/ApiController.java [deleted file]
src/main/java/com/jacobcasper/xivgraph/controllers/StaticController.java [deleted file]
src/main/resources/templates/index.html [deleted file]
xivgraphrest/pom.xml [new file with mode: 0644]
xivgraphrest/src/main/java/com/jacobcasper/xivgraph/App.java [new file with mode: 0644]
xivgraphrest/src/main/java/com/jacobcasper/xivgraph/controllers/ApiController.java [new file with mode: 0644]
xivgraphrest/src/main/java/com/jacobcasper/xivgraph/controllers/StaticController.java [new file with mode: 0644]
xivgraphrest/src/main/resources/templates/index.html [new file with mode: 0644]

diff --git a/fflogsclient/pom.xml b/fflogsclient/pom.xml
new file mode 100644 (file)
index 0000000..8f03f60
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.jacobcasper</groupId>
+        <artifactId>xivgraph</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>fflogsclient</artifactId>
+
+    <properties>
+        <maven.compiler.source>22</maven.compiler.source>
+        <maven.compiler.target>22</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+</project>
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index d8bfe52..0c09d7c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -6,37 +6,43 @@
 
   <groupId>com.jacobcasper</groupId>
   <artifactId>xivgraph</artifactId>
+  <packaging>pom</packaging>
   <version>1.0-SNAPSHOT</version>
-
   <name>xivgraph</name>
   <url>https://www.jacobcasper.com</url>
 
+  <modules>
+    <module>fflogsclient</module>
+    <module>xivgraphrest</module>
+  </modules>
+
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <maven.compiler.source>22</maven.compiler.source>
     <maven.compiler.target>22</maven.compiler.target>
+    <springBootVersion>3.3.0</springBootVersion>
   </properties>
 
   <dependencies>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot</artifactId>
-      <version>3.3.0</version>
+      <version>${springBootVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-autoconfigure</artifactId>
-      <version>3.3.0</version>
+      <version>${springBootVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-thymeleaf</artifactId>
-      <version>3.3.0</version>
+      <version>${springBootVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-web</artifactId>
-      <version>3.3.0</version>
+      <version>${springBootVersion}</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>
diff --git a/src/main/java/com/jacobcasper/xivgraph/App.java b/src/main/java/com/jacobcasper/xivgraph/App.java
deleted file mode 100644 (file)
index 2a718ea..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-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
deleted file mode 100644 (file)
index 22edac6..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-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
deleted file mode 100644 (file)
index 8d741aa..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-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
deleted file mode 100644 (file)
index ed16574..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-<!DOCTYPE HTML>
-<html xmlns:th="http://www.thymeleaf.org">
-<head>
-    <title>XIV Raider Graph</title>
-    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body>
-    <p th:text="|Hello, World!|" />
-</body>
-</html>
diff --git a/xivgraphrest/pom.xml b/xivgraphrest/pom.xml
new file mode 100644 (file)
index 0000000..a15abf9
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>com.jacobcasper</groupId>
+        <artifactId>xivgraph</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>xivgraphrest</artifactId>
+
+    <properties>
+        <maven.compiler.source>22</maven.compiler.source>
+        <maven.compiler.target>22</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+</project>
\ No newline at end of file
diff --git a/xivgraphrest/src/main/java/com/jacobcasper/xivgraph/App.java b/xivgraphrest/src/main/java/com/jacobcasper/xivgraph/App.java
new file mode 100644 (file)
index 0000000..2a718ea
--- /dev/null
@@ -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/xivgraphrest/src/main/java/com/jacobcasper/xivgraph/controllers/ApiController.java b/xivgraphrest/src/main/java/com/jacobcasper/xivgraph/controllers/ApiController.java
new file mode 100644 (file)
index 0000000..22edac6
--- /dev/null
@@ -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/xivgraphrest/src/main/java/com/jacobcasper/xivgraph/controllers/StaticController.java b/xivgraphrest/src/main/java/com/jacobcasper/xivgraph/controllers/StaticController.java
new file mode 100644 (file)
index 0000000..8d741aa
--- /dev/null
@@ -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/xivgraphrest/src/main/resources/templates/index.html b/xivgraphrest/src/main/resources/templates/index.html
new file mode 100644 (file)
index 0000000..ed16574
--- /dev/null
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<html xmlns:th="http://www.thymeleaf.org">
+<head>
+    <title>XIV Raider Graph</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+    <p th:text="|Hello, World!|" />
+</body>
+</html>