From 4268f8da847cc47d011f772c7dc1e370a0a6c8c5 Mon Sep 17 00:00:00 2001 From: Sriram Date: Sat, 17 Apr 2021 18:15:41 +0530 Subject: [PATCH 1/2] Use ConfigDataLocationResolvers' class loader to load resolver names See gh-26149 --- .../boot/context/config/ConfigDataLocationResolvers.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java index 60f5ce9269..aeb40060f4 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java @@ -54,7 +54,8 @@ class ConfigDataLocationResolvers { ConfigDataLocationResolvers(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext, Binder binder, ResourceLoader resourceLoader) { this(logFactory, bootstrapContext, binder, resourceLoader, - SpringFactoriesLoader.loadFactoryNames(ConfigDataLocationResolver.class, null)); + SpringFactoriesLoader.loadFactoryNames(ConfigDataLocationResolver.class, + ConfigDataLocationResolver.class.getClassLoader())); } /** From 0c30a5930d4f09d644fc86e2e4557c72462be6cd Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 19 Apr 2021 10:23:27 +0100 Subject: [PATCH 2/2] Polish "Use ConfigDataLocationResolvers' class loader to load resolver names" See gh-26149 --- .../boot/context/config/ConfigDataLocationResolvers.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java index aeb40060f4..5f89b1a0d8 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/ConfigDataLocationResolvers.java @@ -53,9 +53,8 @@ class ConfigDataLocationResolvers { */ ConfigDataLocationResolvers(DeferredLogFactory logFactory, ConfigurableBootstrapContext bootstrapContext, Binder binder, ResourceLoader resourceLoader) { - this(logFactory, bootstrapContext, binder, resourceLoader, - SpringFactoriesLoader.loadFactoryNames(ConfigDataLocationResolver.class, - ConfigDataLocationResolver.class.getClassLoader())); + this(logFactory, bootstrapContext, binder, resourceLoader, SpringFactoriesLoader + .loadFactoryNames(ConfigDataLocationResolver.class, ConfigDataLocationResolver.class.getClassLoader())); } /**