diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java index a744ec9066..584fa8c188 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java @@ -291,7 +291,7 @@ public final class ConfigurationPropertyName implements Comparable= name.getNumberOfElements()) { return false; } - return elementsEqual(name); + return endsWithElementsEqualTo(name); } @Override @@ -357,10 +357,20 @@ public final class ConfigurationPropertyName implements Comparable= 0; i--) { if (elementDiffers(this.elements, name.elements, i)) { return false; @@ -508,19 +518,7 @@ public final class ConfigurationPropertyName implements Comparable