solutions.bkit.configurableloadbalanced.MappedServicesConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of configurable-load-balanced Show documentation
Show all versions of configurable-load-balanced Show documentation
A configurable Spring Cloud Load Balancer
package solutions.bkit.configurableloadbalanced;
import java.util.Map;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
@Configuration
@ConditionalOnProperty(prefix = "property-source-lb", name = "enabled", havingValue = "true")
@PropertySource("classpath:/services-map.properties")
@ConfigurationProperties(prefix = "property-source-lb")
public class MappedServicesConfig {
private Map services;
public MappedServicesConfig(Map services) {
this.services = services;
}
public Map getServices() {
return services;
}
}