DubboConfig.java 3.03 KB
package cn.com.glsx.merchants.config;

import cn.com.glsx.merchants.remote.*;
import com.glsx.biz.common.base.service.CarbrandService;
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;

/**
 * Dubbo服务注册配置
 */
@Configuration
public class DubboConfig {

    @Autowired
    private ReferenceBuilderFactory factory;

    @Bean
    public MerchantProductRemote getMerchantProductRemote() {
        return factory.builder(MerchantProductRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantProductMenuRemote getMerchantProductMenuRemote() {
        return factory.builder(MerchantProductMenuRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantDictTypeRemote getMerchantDictTypeRemote() {
        return factory.builder(MerchantDictTypeRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantDictDataRemote getMerchantDictDataRemote() {
        return factory.builder(MerchantDictDataRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantProductFunctionRemote getMerchantProductFunctionRemote() {
        return factory.builder(MerchantProductFunctionRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantLogRemote getMerchantLogRemote() {
        return factory.builder(MerchantLogRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantUserRemote getMerchantUserRemote() {
        return factory.builder(MerchantUserRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantFileRemote getMerchantFileRemote() {
        return factory.builder(MerchantFileRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantAccountTypeRemote getMerchantAccountTypeRemote() {
        return factory.builder(MerchantAccountTypeRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantRoleRemote getMerchantRoleRemote() {
        return factory.builder(MerchantRoleRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantRemote getMerchantRemote() {
        return factory.builder(MerchantRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public MerchantStaffRemote getMerchantStaffRemote() {
        return factory.builder(MerchantStaffRemote.class).check(false).timeout(30000).version("2.0.0").build();
    }

    @Bean
    public CarbrandService getCarbrandService(){
        return factory.builder(CarbrandService.class).check(false).timeout(30000).version("2.2.0").build();
    }

}