diff --git a/src/main/java/eu/h2020/symbiote/rapplugin/RapPluginConfiguration.java b/src/main/java/eu/h2020/symbiote/rapplugin/RapPluginConfiguration.java index 688e6af..8038801 100644 --- a/src/main/java/eu/h2020/symbiote/rapplugin/RapPluginConfiguration.java +++ b/src/main/java/eu/h2020/symbiote/rapplugin/RapPluginConfiguration.java @@ -17,14 +17,16 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; import eu.h2020.symbiote.rapplugin.messaging.RabbitManager; +import eu.h2020.symbiote.rapplugin.messaging.rap.RapPlugin; import eu.h2020.symbiote.rapplugin.properties.RabbitConnectionProperties; +import eu.h2020.symbiote.rapplugin.properties.RapPluginProperties; import eu.h2020.symbiote.rapplugin.properties.RapProperties; @Configuration -@ComponentScan(basePackages = {"eu.h2020.symbiote.rapplugin"}) @EnableConfigurationProperties({ RabbitConnectionProperties.class, RapProperties.class}) @@ -36,6 +38,16 @@ public RabbitManager rapRabbitManager(RabbitTemplate template) { return new RabbitManager(template); } + @Bean + public RapPlugin rapPlugin(RabbitManager manager, RapPluginProperties props) { + return new RapPlugin(manager, props); + } + + @Bean + public RapPluginProperties rapPluginProperties(RabbitConnectionProperties rabbitConnection, RapProperties pluginProperties) { + return new RapPluginProperties(rabbitConnection, pluginProperties); + } + @Autowired private SimpleRabbitListenerContainerFactory simpleRabbitListenerContainerFactory; diff --git a/src/main/java/eu/h2020/symbiote/rapplugin/messaging/rap/RapPlugin.java b/src/main/java/eu/h2020/symbiote/rapplugin/messaging/rap/RapPlugin.java index 45c0bae..0583ef3 100644 --- a/src/main/java/eu/h2020/symbiote/rapplugin/messaging/rap/RapPlugin.java +++ b/src/main/java/eu/h2020/symbiote/rapplugin/messaging/rap/RapPlugin.java @@ -60,7 +60,6 @@ * @author Mario Kušek * */ -@Service public class RapPlugin implements SmartLifecycle { private static final Logger LOG = LoggerFactory.getLogger(RapPlugin.class); diff --git a/src/main/java/eu/h2020/symbiote/rapplugin/properties/RapPluginProperties.java b/src/main/java/eu/h2020/symbiote/rapplugin/properties/RapPluginProperties.java index 1123f64..5b9617f 100644 --- a/src/main/java/eu/h2020/symbiote/rapplugin/properties/RapPluginProperties.java +++ b/src/main/java/eu/h2020/symbiote/rapplugin/properties/RapPluginProperties.java @@ -12,7 +12,6 @@ * @author Mario Kušek * */ -@Component("rapPluginProperties") public class RapPluginProperties { /** * The name of RAP plugin.