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

org.zodiac.autoconfigure.loadbalancer.ribbon.PlatformRibbonAutoConfiguration Maven / Gradle / Ivy

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

import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.zodiac.autoconfigure.bootstrap.condition.ConditionalOnSpringCloudBootstrapDisabled;
import org.zodiac.autoconfigure.loadbalancer.ribbon.condition.ConditionalOnRibbonEnabled;
import org.zodiac.loadbalancer.ribbon.RibbonPropertiesFactory;
import org.zodiac.loadbalancer.ribbon.constants.RibbonSystemPropertiesConstants;

@SpringBootConfiguration
@ConditionalOnRibbonEnabled
@ConditionalOnSpringCloudBootstrapDisabled
public class PlatformRibbonAutoConfiguration {

    public PlatformRibbonAutoConfiguration() {
    }

    @Bean
    @ConditionalOnMissingBean
    @ConfigurationProperties(prefix = RibbonSystemPropertiesConstants.RIBBON_CLIENT_PREFIX)
    protected PlatformRibbonClientProperties ribbonClientProperties() {
        return new PlatformRibbonClientProperties();
    }

    @Bean
    @ConditionalOnMissingBean
    protected RibbonPropertiesFactory ribbonPropertiesFactory() {
        return new RibbonPropertiesFactory();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy