Commit a1d08903 by pahli

make property injection optional

parent 71c906b0
......@@ -30,8 +30,12 @@ import java.util.Map;
*/
public class DefaultServerIntrospector implements ServerIntrospector {
@Autowired
private ServerIntrospectorProperties serverIntrospectorProperties;
private ServerIntrospectorProperties serverIntrospectorProperties = new ServerIntrospectorProperties();
@Autowired(required = false)
public void setServerIntrospectorProperties(ServerIntrospectorProperties serverIntrospectorProperties){
this.serverIntrospectorProperties = serverIntrospectorProperties;
}
@Override
public boolean isSecure(Server server) {
......
......@@ -61,7 +61,7 @@ import com.netflix.ribbon.Ribbon;
@RibbonClients
@AutoConfigureAfter(name = "org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration")
@AutoConfigureBefore({LoadBalancerAutoConfiguration.class, AsyncLoadBalancerAutoConfiguration.class})
@EnableConfigurationProperties(RibbonEagerLoadProperties.class)
@EnableConfigurationProperties({RibbonEagerLoadProperties.class, ServerIntrospectorProperties.class})
public class RibbonAutoConfiguration {
@Autowired(required = false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment