diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/StandardConfigDataLocationResolver.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/StandardConfigDataLocationResolver.java index beb076ad869..5da6bd1bb7a 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/StandardConfigDataLocationResolver.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/StandardConfigDataLocationResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -89,7 +89,7 @@ public class StandardConfigDataLocationResolver ResourceLoader resourceLoader) { this.logger = logFactory.getLog(StandardConfigDataLocationResolver.class); this.propertySourceLoaders = SpringFactoriesLoader.loadFactories(PropertySourceLoader.class, - getClass().getClassLoader()); + resourceLoader.getClassLoader()); this.configNames = getConfigNames(binder); this.resourceLoader = new LocationResourceLoader(resourceLoader); }