From f0113ff34d7a4147ce54116680b611061244f39a Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Wed, 28 Dec 2022 17:14:28 +0100 Subject: [PATCH] refactor: Refined packaging (renamed packages and classes) --- .../de/juplo/kafka/chat/backend/ChatBackendApplication.java | 6 +++--- .../juplo/kafka/chat/backend/api/ChatBackendController.java | 6 +++--- .../kafka/chat/backend/api/ChatBackendControllerAdvice.java | 6 +++--- .../java/de/juplo/kafka/chat/backend/api/MessageTo.java | 4 ++-- .../java/de/juplo/kafka/chat/backend/domain/Chatroom.java | 2 +- .../java/de/juplo/kafka/chat/backend/domain/Message.java | 2 +- .../kafka/chat/backend/domain/MessageMutationException.java | 2 +- .../kafka/chat/backend/ChatBackendApplicationTests.java | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendApplication.java b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendApplication.java index 287c9ee0..f8c38b63 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/ChatBackendApplication.java +++ b/src/main/java/de/juplo/kafka/chat/backend/ChatBackendApplication.java @@ -1,4 +1,4 @@ -package de.juplo.kafka.chatroom; +package de.juplo.kafka.chat.backend; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -8,7 +8,7 @@ import java.time.Clock; @SpringBootApplication -public class ChatroomApplication +public class ChatBackendApplication { @Bean public Clock clock() @@ -19,6 +19,6 @@ public class ChatroomApplication public static void main(String[] args) { - SpringApplication.run(ChatroomApplication.class, args); + SpringApplication.run(ChatBackendApplication.class, args); } } diff --git a/src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendController.java b/src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendController.java index d6130927..437ff1f7 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendController.java +++ b/src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendController.java @@ -1,6 +1,6 @@ -package de.juplo.kafka.chatroom.api; +package de.juplo.kafka.chat.backend.api; -import de.juplo.kafka.chatroom.domain.Chatroom; +import de.juplo.kafka.chat.backend.domain.Chatroom; import lombok.RequiredArgsConstructor; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; @@ -17,7 +17,7 @@ import java.util.UUID; @RestController @RequiredArgsConstructor -public class ChatroomController +public class ChatBackendController { private final Map chatrooms = new HashMap<>(); private final Clock clock; diff --git a/src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendControllerAdvice.java b/src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendControllerAdvice.java index 42f7599e..d164fb5a 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendControllerAdvice.java +++ b/src/main/java/de/juplo/kafka/chat/backend/api/ChatBackendControllerAdvice.java @@ -1,6 +1,6 @@ -package de.juplo.kafka.chatroom.api; +package de.juplo.kafka.chat.backend.api; -import de.juplo.kafka.chatroom.domain.MessageMutationException; +import de.juplo.kafka.chat.backend.domain.MessageMutationException; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.http.ProblemDetail; @@ -13,7 +13,7 @@ import java.util.Date; @ControllerAdvice -public class ChatroomControllerAdvice +public class ChatBackendControllerAdvice { @Value("${server.context-path:/}") String contextPath; diff --git a/src/main/java/de/juplo/kafka/chat/backend/api/MessageTo.java b/src/main/java/de/juplo/kafka/chat/backend/api/MessageTo.java index c7713865..7c72873e 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/api/MessageTo.java +++ b/src/main/java/de/juplo/kafka/chat/backend/api/MessageTo.java @@ -1,6 +1,6 @@ -package de.juplo.kafka.chatroom.api; +package de.juplo.kafka.chat.backend.api; -import de.juplo.kafka.chatroom.domain.Message; +import de.juplo.kafka.chat.backend.domain.Message; import lombok.AllArgsConstructor; import lombok.Data; diff --git a/src/main/java/de/juplo/kafka/chat/backend/domain/Chatroom.java b/src/main/java/de/juplo/kafka/chat/backend/domain/Chatroom.java index 62d33f27..62c97327 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/domain/Chatroom.java +++ b/src/main/java/de/juplo/kafka/chat/backend/domain/Chatroom.java @@ -1,4 +1,4 @@ -package de.juplo.kafka.chatroom.domain; +package de.juplo.kafka.chat.backend.domain; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/de/juplo/kafka/chat/backend/domain/Message.java b/src/main/java/de/juplo/kafka/chat/backend/domain/Message.java index 84cddede..d52ce8a1 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/domain/Message.java +++ b/src/main/java/de/juplo/kafka/chat/backend/domain/Message.java @@ -1,4 +1,4 @@ -package de.juplo.kafka.chatroom.domain; +package de.juplo.kafka.chat.backend.domain; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/src/main/java/de/juplo/kafka/chat/backend/domain/MessageMutationException.java b/src/main/java/de/juplo/kafka/chat/backend/domain/MessageMutationException.java index db4ebc24..0408de3a 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/domain/MessageMutationException.java +++ b/src/main/java/de/juplo/kafka/chat/backend/domain/MessageMutationException.java @@ -1,4 +1,4 @@ -package de.juplo.kafka.chatroom.domain; +package de.juplo.kafka.chat.backend.domain; import lombok.Getter; diff --git a/src/test/java/de/juplo/kafka/chat/backend/ChatBackendApplicationTests.java b/src/test/java/de/juplo/kafka/chat/backend/ChatBackendApplicationTests.java index 9b23ad0f..fde473c6 100644 --- a/src/test/java/de/juplo/kafka/chat/backend/ChatBackendApplicationTests.java +++ b/src/test/java/de/juplo/kafka/chat/backend/ChatBackendApplicationTests.java @@ -1,10 +1,10 @@ -package de.juplo.kafka.chatroom; +package de.juplo.kafka.chat.backend; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest -class ChatroomApplicationTests +class ChatBackendApplicationTests { @Test void contextLoads() -- 2.20.1