diff --git a/spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/PropertiesFactory.java b/spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/PropertiesFactory.java index 09072b7ecb..29924778c2 100644 --- a/spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/PropertiesFactory.java +++ b/spring-cloud-netflix-ribbon/src/main/java/org/springframework/cloud/netflix/ribbon/PropertiesFactory.java @@ -57,8 +57,10 @@ public boolean isSet(Class clazz, String name) { public String getClassName(Class clazz, String name) { if (this.classToProperty.containsKey(clazz)) { String classNameProperty = this.classToProperty.get(clazz); - String className = environment - .getProperty(name + "." + NAMESPACE + "." + classNameProperty); + String className = environment.getProperty(name + "." + NAMESPACE + "." + classNameProperty); + if(!StringUtils.hasText(className)){ + className = environment.getProperty(NAMESPACE + "." + classNameProperty); + } return className; } return null;