net.guerlab.cloud.pay.stream.provider.autoconfigure.PayStreamProviderAutoConfigure Maven / Gradle / Ivy
The newest version!
/*
* Copyright 2018-2021 guerlab.net and other contributors.
*
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 3 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.guerlab.cloud.pay.stream.provider.autoconfigure;
import net.guerlab.cloud.pay.stream.provider.handlers.MultiPayOrderStatusChangeSendHandler;
import net.guerlab.cloud.pay.stream.provider.handlers.PayOrderStatusChangeSendHandler;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.cloud.stream.function.FunctionConfiguration;
import org.springframework.cloud.stream.function.StreamBridge;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* 支付消息生产者自动配置
*
* @author guer
*/
@SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection")
@Configuration
@AutoConfigureAfter({ FunctionConfiguration.class, PayStreamProviderBindingDestinationAutoConfigure.class })
public class PayStreamProviderAutoConfigure {
/**
* 构造订单状态变更消息发送处理
*
* @param streamBridge
* streamBridge
* @return 订单状态变更消息发送处理
*/
@Bean
public PayOrderStatusChangeSendHandler payOrderStatusChangeSendHandler(StreamBridge streamBridge) {
return new PayOrderStatusChangeSendHandler(streamBridge);
}
/**
* 构造多订单状态变更消息发送处理
*
* @param streamBridge
* streamBridge
* @return 多订单状态变更消息发送处理
*/
@Bean
public MultiPayOrderStatusChangeSendHandler multiPayOrderStatusChangeSendHandler(StreamBridge streamBridge) {
return new MultiPayOrderStatusChangeSendHandler(streamBridge);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy