From f85a7258a6094f4b076bc97885c99de043bf73cb Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Thu, 27 Jul 2023 16:31:46 +0200 Subject: [PATCH] Polish SampleAmqpSimpleApplication --- .../java/smoketest/amqp/SampleAmqpSimpleApplication.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-amqp/src/main/java/smoketest/amqp/SampleAmqpSimpleApplication.java b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-amqp/src/main/java/smoketest/amqp/SampleAmqpSimpleApplication.java index 410385cb72..356ce74c9d 100644 --- a/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-amqp/src/main/java/smoketest/amqp/SampleAmqpSimpleApplication.java +++ b/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-amqp/src/main/java/smoketest/amqp/SampleAmqpSimpleApplication.java @@ -16,7 +16,8 @@ package smoketest.amqp; -import java.util.Date; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.springframework.amqp.core.Queue; import org.springframework.amqp.rabbit.annotation.RabbitHandler; @@ -31,6 +32,8 @@ import org.springframework.messaging.handler.annotation.Payload; @RabbitListener(queues = "foo") public class SampleAmqpSimpleApplication { + private static final Log logger = LogFactory.getLog(SampleAmqpSimpleApplication.class); + @Bean public Sender mySender() { return new Sender(); @@ -43,7 +46,7 @@ public class SampleAmqpSimpleApplication { @RabbitHandler public void process(@Payload String foo) { - System.out.println(new Date() + ": " + foo); + logger.info(foo); } @Bean