All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.autoconfigure.dubbo.DubboServiceRoutingAutoConfiguration Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.autoconfigure.dubbo;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.ObjectProvider;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.bootstrap.breaker.routing.AppRoutingProperties;
import org.zodiac.autoconfigure.bootstrap.condition.ConditionalOnAppDiscoveryEnabled;
import org.zodiac.autoconfigure.bootstrap.condition.ConditionalOnSpringCloudBootstrapDisabled;

@SpringBootConfiguration
@ConditionalOnAppDiscoveryEnabled
@ConditionalOnSpringCloudBootstrapDisabled
@EnableConfigurationProperties(value = {AppRoutingProperties.class})
@ConditionalOnClass(value = {org.zodiac.dubbo.core.AppInstanceManagerHolder.class, org.apache.dubbo.common.Version.class, org.apache.dubbo.rpc.Invocation.class})
public class DubboServiceRoutingAutoConfiguration extends org.zodiac.dubbo.core.config.DubboServiceRoutingConfigurer implements InitializingBean {

//    @Autowired(required = false)
//    AppRoutingProperties routingProperties;

    public DubboServiceRoutingAutoConfiguration(ObjectProvider routingPropertiesProvider) {
        super(routingPropertiesProvider.getIfAvailable());
    }

    @Bean
    @ConditionalOnMissingBean
    protected org.zodiac.dubbo.core.bootstrap.DubboServiceRoutingBootstrap dubboServiceRoutingBootstrap(){
        return super.dubboServiceRoutingBootstrap();
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        super.init();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy