diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/FilteringSpringBootCondition.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/FilteringSpringBootCondition.java index 45c572da11..f470245267 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/FilteringSpringBootCondition.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/FilteringSpringBootCondition.java @@ -105,7 +105,7 @@ abstract class FilteringSpringBootCondition extends SpringBootCondition */ protected static Class resolve(String className, ClassLoader classLoader) throws ClassNotFoundException { if (classLoader != null) { - return classLoader.loadClass(className); + return Class.forName(className, false, classLoader); } return Class.forName(className); }