From f97f3062fce76562f4871dd1920bb514454a6b36 Mon Sep 17 00:00:00 2001 From: Giuseppe La Scaleia Date: Wed, 27 Oct 2021 09:21:01 +0200 Subject: [PATCH] Added Profile STOMP --- .../radar/downloader/DPCRadarDataStompSessionHandler.java | 3 ++- .../gov/protezionecivile/radar/downloader/StompClient.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/java/src/main/java/gov/protezionecivile/radar/downloader/DPCRadarDataStompSessionHandler.java b/java/src/main/java/gov/protezionecivile/radar/downloader/DPCRadarDataStompSessionHandler.java index 1a89967..8647fca 100644 --- a/java/src/main/java/gov/protezionecivile/radar/downloader/DPCRadarDataStompSessionHandler.java +++ b/java/src/main/java/gov/protezionecivile/radar/downloader/DPCRadarDataStompSessionHandler.java @@ -287,6 +287,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Profile; import org.springframework.messaging.simp.stomp.StompCommand; import org.springframework.messaging.simp.stomp.StompHeaders; import org.springframework.messaging.simp.stomp.StompSession; @@ -301,7 +302,7 @@ /** * @author Francesco Izzi @ CNR IMAA geoSDI */ - +@Profile(value = "stomp") @Component(value = "dpcSessionHandler") public class DPCRadarDataStompSessionHandler extends StompSessionHandlerAdapter implements InitializingBean { diff --git a/java/src/main/java/gov/protezionecivile/radar/downloader/StompClient.java b/java/src/main/java/gov/protezionecivile/radar/downloader/StompClient.java index 3a3a632..d5d0dac 100644 --- a/java/src/main/java/gov/protezionecivile/radar/downloader/StompClient.java +++ b/java/src/main/java/gov/protezionecivile/radar/downloader/StompClient.java @@ -281,6 +281,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Profile; import org.springframework.messaging.converter.MappingJackson2MessageConverter; import org.springframework.messaging.simp.stomp.StompSession; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; @@ -295,7 +296,7 @@ /** * @author Francesco Izzi @ CNR IMAA geoSDI */ - +@Profile(value = "stomp") @Component public class StompClient {