refactor: Moved base-configuration into separate package -- Move
authorKai Moritz <kai@juplo.de>
Wed, 11 Jan 2023 21:12:12 +0000 (22:12 +0100)
committerKai Moritz <kai@juplo.de>
Wed, 11 Jan 2023 21:12:12 +0000 (22:12 +0100)
src/main/java/de/juplo/kafka/chat/backend/ChatBackendConfiguration.java [deleted file]
src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java [deleted file]
src/main/java/de/juplo/kafka/chat/backend/config/ChatBackendConfiguration.java [new file with mode: 0644]
src/main/java/de/juplo/kafka/chat/backend/config/ChatBackendProperties.java [new file with mode: 0644]

diff --git a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendConfiguration.java b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendConfiguration.java
deleted file mode 100644 (file)
index 10e9d37..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-package de.juplo.kafka.chat.backend;
-
-import de.juplo.kafka.chat.backend.domain.ChatHome;
-import de.juplo.kafka.chat.backend.domain.ChatHomeService;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-
-import java.time.Clock;
-
-
-@Configuration
-@EnableConfigurationProperties(ChatBackendProperties.class)
-public class ChatBackendConfiguration
-{
-  @Bean
-  public ChatHome chatHome(ChatHomeService chatHomeService)
-  {
-    return new ChatHome(chatHomeService);
-  }
-
-  @Bean
-  public Clock clock()
-  {
-    return Clock.systemDefaultZone();
-  }
-}
diff --git a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendProperties.java
deleted file mode 100644 (file)
index 48e5816..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-package de.juplo.kafka.chat.backend;
-
-import lombok.Getter;
-import lombok.Setter;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-import java.nio.file.Paths;
-
-
-@ConfigurationProperties("chat.backend")
-@Getter
-@Setter
-public class ChatBackendProperties
-{
-  private String storageDirectory = Paths.get(System.getProperty("java.io.tmpdir"),"chat", "backend").toString();
-  private String allowedOrigins = "http://localhost:4200";
-  private int chatroomBufferSize = 8;
-}
diff --git a/src/main/java/de/juplo/kafka/chat/backend/config/ChatBackendConfiguration.java b/src/main/java/de/juplo/kafka/chat/backend/config/ChatBackendConfiguration.java
new file mode 100644 (file)
index 0000000..10e9d37
--- /dev/null
@@ -0,0 +1,27 @@
+package de.juplo.kafka.chat.backend;
+
+import de.juplo.kafka.chat.backend.domain.ChatHome;
+import de.juplo.kafka.chat.backend.domain.ChatHomeService;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.time.Clock;
+
+
+@Configuration
+@EnableConfigurationProperties(ChatBackendProperties.class)
+public class ChatBackendConfiguration
+{
+  @Bean
+  public ChatHome chatHome(ChatHomeService chatHomeService)
+  {
+    return new ChatHome(chatHomeService);
+  }
+
+  @Bean
+  public Clock clock()
+  {
+    return Clock.systemDefaultZone();
+  }
+}
diff --git a/src/main/java/de/juplo/kafka/chat/backend/config/ChatBackendProperties.java b/src/main/java/de/juplo/kafka/chat/backend/config/ChatBackendProperties.java
new file mode 100644 (file)
index 0000000..48e5816
--- /dev/null
@@ -0,0 +1,18 @@
+package de.juplo.kafka.chat.backend;
+
+import lombok.Getter;
+import lombok.Setter;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+
+import java.nio.file.Paths;
+
+
+@ConfigurationProperties("chat.backend")
+@Getter
+@Setter
+public class ChatBackendProperties
+{
+  private String storageDirectory = Paths.get(System.getProperty("java.io.tmpdir"),"chat", "backend").toString();
+  private String allowedOrigins = "http://localhost:4200";
+  private int chatroomBufferSize = 8;
+}