io.github.springwolf.plugins.jms.configuration.SpringwolfJmsProducerConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of springwolf-jms Show documentation
Show all versions of springwolf-jms Show documentation
Automated JSON API documentation for JMS Listeners built with Spring
// SPDX-License-Identifier: Apache-2.0
package io.github.springwolf.plugins.jms.configuration;
import io.github.springwolf.core.controller.PublishingPayloadCreator;
import io.github.springwolf.plugins.jms.controller.SpringwolfJmsController;
import io.github.springwolf.plugins.jms.producer.SpringwolfJmsProducer;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.core.JmsTemplate;
import java.util.List;
import static io.github.springwolf.plugins.jms.configuration.properties.SpringwolfJmsConfigConstants.SPRINGWOLF_JMS_CONFIG_PREFIX;
import static io.github.springwolf.plugins.jms.configuration.properties.SpringwolfJmsConfigConstants.SPRINGWOLF_JMS_PLUGIN_PUBLISHING_ENABLED;
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(
prefix = SPRINGWOLF_JMS_CONFIG_PREFIX,
name = SPRINGWOLF_JMS_PLUGIN_PUBLISHING_ENABLED,
havingValue = "true")
public class SpringwolfJmsProducerConfiguration {
@Bean
@ConditionalOnMissingBean
public SpringwolfJmsProducer springwolfJmsProducer(List jmsTemplates) {
return new SpringwolfJmsProducer(jmsTemplates);
}
@Bean
@ConditionalOnMissingBean
public SpringwolfJmsController springwolfJmsController(
PublishingPayloadCreator publishingPayloadCreator, SpringwolfJmsProducer springwolfJmsProducer) {
return new SpringwolfJmsController(publishingPayloadCreator, springwolfJmsProducer);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy