io.github.springwolf.plugins.sqs.configuration.SpringwolfSqsProducerConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of springwolf-sqs Show documentation
Show all versions of springwolf-sqs Show documentation
Automated JSON API documentation for AWS SQS Listeners built with Spring
// SPDX-License-Identifier: Apache-2.0
package io.github.springwolf.plugins.sqs.configuration;
import io.awspring.cloud.sqs.operations.SqsTemplate;
import io.github.springwolf.core.controller.PublishingPayloadCreator;
import io.github.springwolf.plugins.sqs.controller.SpringwolfSqsController;
import io.github.springwolf.plugins.sqs.producer.SpringwolfSqsProducer;
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 java.util.List;
import static io.github.springwolf.plugins.sqs.configuration.properties.SpringwolfSqsConfigConstants.SPRINGWOLF_SQS_CONFIG_PREFIX;
import static io.github.springwolf.plugins.sqs.configuration.properties.SpringwolfSqsConfigConstants.SPRINGWOLF_SQS_PLUGIN_PUBLISHING_ENABLED;
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(
prefix = SPRINGWOLF_SQS_CONFIG_PREFIX,
name = SPRINGWOLF_SQS_PLUGIN_PUBLISHING_ENABLED,
havingValue = "true")
public class SpringwolfSqsProducerConfiguration {
@Bean
@ConditionalOnMissingBean
public SpringwolfSqsProducer springwolfSqsProducer(List sqsTemplates) {
return new SpringwolfSqsProducer(sqsTemplates);
}
@Bean
@ConditionalOnMissingBean
public SpringwolfSqsController springwolfSqsController(
PublishingPayloadCreator publishingPayloadCreator, SpringwolfSqsProducer springwolfSqsProducer) {
return new SpringwolfSqsController(publishingPayloadCreator, springwolfSqsProducer);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy