From 75f2e54183e75e6e650cb8cd5c260eff5ebfc712 Mon Sep 17 00:00:00 2001 From: Marc Gorzala Date: Thu, 14 Dec 2023 17:29:35 +0100 Subject: [PATCH] debugging statements --- .../dancier/dancer/chat/ChatController.java | 2 +- .../dancer/chat/client/ChatServiceClient.java | 4 ++++ .../net/dancier/dancer/output/OutboxJob.java | 20 ------------------- src/main/resources/application-dev.yml | 1 - src/main/resources/application.yml | 6 ++++-- .../dancier/dancer/TestDatabaseHelper.java | 2 +- 6 files changed, 10 insertions(+), 25 deletions(-) delete mode 100644 src/main/java/net/dancier/dancer/output/OutboxJob.java diff --git a/src/main/java/net/dancier/dancer/chat/ChatController.java b/src/main/java/net/dancier/dancer/chat/ChatController.java index e4c04e17..1e927d7c 100644 --- a/src/main/java/net/dancier/dancer/chat/ChatController.java +++ b/src/main/java/net/dancier/dancer/chat/ChatController.java @@ -26,7 +26,7 @@ @RequestMapping("/chats") @RequiredArgsConstructor public class ChatController { - private final static Logger log = LoggerFactory.getLogger(ContactController.class); + private final static Logger log = LoggerFactory.getLogger(ChatController.class); private final ChatService chatService; diff --git a/src/main/java/net/dancier/dancer/chat/client/ChatServiceClient.java b/src/main/java/net/dancier/dancer/chat/client/ChatServiceClient.java index 234e8e9b..ae829310 100644 --- a/src/main/java/net/dancier/dancer/chat/client/ChatServiceClient.java +++ b/src/main/java/net/dancier/dancer/chat/client/ChatServiceClient.java @@ -4,6 +4,8 @@ import net.dancier.dancer.chat.dto.CreateChatDto; import net.dancier.dancer.chat.dto.ChatsDto; import net.dancier.dancer.chat.dto.MessagesDto; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.client.ExchangeFilterFunction; @@ -19,6 +21,8 @@ @Service public class ChatServiceClient { + private static Logger log = LoggerFactory.getLogger(ChatServiceClient.class); + @Value("${app.chatDancer.host}") private String host; diff --git a/src/main/java/net/dancier/dancer/output/OutboxJob.java b/src/main/java/net/dancier/dancer/output/OutboxJob.java deleted file mode 100644 index b1be9936..00000000 --- a/src/main/java/net/dancier/dancer/output/OutboxJob.java +++ /dev/null @@ -1,20 +0,0 @@ -package net.dancier.dancer.output; - -import lombok.RequiredArgsConstructor; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.annotation.Profile; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Component; - -@Profile("!test") -@Component -@RequiredArgsConstructor -public class OutboxJob { - private final Logger log = LoggerFactory.getLogger(OutboxJob.class); - - @Scheduled(fixedRate = 10000) - public void process() { - log.debug("Sending out events"); - } -} diff --git a/src/main/resources/application-dev.yml b/src/main/resources/application-dev.yml index de08ce7d..af3f6dc1 100644 --- a/src/main/resources/application-dev.yml +++ b/src/main/resources/application-dev.yml @@ -5,4 +5,3 @@ app: host: http://test.dancier.net:5000 chatDancer: host: http://test.dancier.net:9999 - diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index da8234b2..d15d0017 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -20,8 +20,10 @@ spring: test: database: replace: none - profiles: - active: dev +# config: +# activate: +# on-profile: +# - dev app: admin: email: marc@gorzala.de diff --git a/src/test/java/net/dancier/dancer/TestDatabaseHelper.java b/src/test/java/net/dancier/dancer/TestDatabaseHelper.java index bc0e642c..d1ec8f29 100644 --- a/src/test/java/net/dancier/dancer/TestDatabaseHelper.java +++ b/src/test/java/net/dancier/dancer/TestDatabaseHelper.java @@ -12,7 +12,7 @@ * state in the database that could not be checked with production * Repository implementations, because they would have to be implemented their * sole for testing purposes. - * This help is supposed to be run in an Transaction that encapsulates the whole test. + * This helper is supposed to run in a Transaction that encapsulates the whole test. * For this reason we flush the entityManager before checking the database state, * because otherwise it could be, that entities would not have been saved/updated by * hibernate.