GopDubboConfig.java 1.61 KB
package cn.com.glsx.dj.weapp.config;

import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import cn.com.glsx.dj.gop.remote.GopBoutiqueDeliveryRemote;
import cn.com.glsx.dj.gop.remote.GopCarInfoRemote;
import cn.com.glsx.dj.gop.remote.GopCreateQrCodeRemote;
import cn.com.glsx.dj.gop.remote.GopMileageRemote;
import cn.com.glsx.dj.gop.remote.GopSendTemplateMessageRemote;

@Configuration
public class GopDubboConfig {
	
	@Autowired
	private ReferenceBuilderFactory factory;
	
	@Bean
	public GopBoutiqueDeliveryRemote gopBoutiqueDeliveryRemote() {
		return factory.builder(GopBoutiqueDeliveryRemote.class).check(false).timeout(30000).build();
	}
	
	/**
	 * 发送模板消息
	 * @return
	 * @author zhangyan
	 * @date 2020年4月7日09:42:29
	 */
	@Bean
	public GopSendTemplateMessageRemote gopSendTemplateMessageRemote(){
		return factory.builder(GopSendTemplateMessageRemote.class).check(false).timeout(30000).build();
	}
	
	/**
	 * 设备里程接口
	 * @return
	 */
	@Bean
	public GopMileageRemote gopMileageRemote(){
		return factory.builder(GopMileageRemote.class).check(false).timeout(30000).build();
	}
	
	/**
	 * 车型
	 */
	@Bean
	public GopCarInfoRemote gopCarInfoRemote(){
		return factory.builder(GopCarInfoRemote.class).timeout(30000).check(false).build();
	}
	
	@Bean
	public GopCreateQrCodeRemote gopCreateQrCodeRemote(){
		return factory.builder(GopCreateQrCodeRemote.class).timeout(30000).check(false).build();
	}
	
}