org.zodiac.autoconfigure.loadbalancer.ribbon.PlatformRibbonAutoConfiguration Maven / Gradle / Ivy
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();
}
}