Skip to content

Commit cc24f67

Browse files
committed
GH-1437 - Forward classloader into ConfigDataEnvironmentPostProcessor application.
1 parent c4da5e4 commit cc24f67

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-modulith-core/src/main/java/org/springframework/modulith/core/ApplicationModuleDetectionStrategyLookup.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.springframework.beans.BeanUtils;
2424
import org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor;
2525
import org.springframework.core.env.StandardEnvironment;
26+
import org.springframework.core.io.DefaultResourceLoader;
2627
import org.springframework.core.io.support.SpringFactoriesLoader;
2728
import org.springframework.util.ClassUtils;
2829
import org.springframework.util.StringUtils;
@@ -83,7 +84,8 @@ class ApplicationModuleDetectionStrategyLookup {
8384
static ApplicationModuleDetectionStrategy getStrategy() {
8485

8586
var environment = new StandardEnvironment();
86-
ConfigDataEnvironmentPostProcessor.applyTo(environment);
87+
ConfigDataEnvironmentPostProcessor.applyTo(environment,
88+
new DefaultResourceLoader(ApplicationModuleDetectionStrategyLookup.class.getClassLoader()), null);
8789

8890
var configuredStrategy = environment.getProperty(DETECTION_STRATEGY_PROPERTY, String.class);
8991

0 commit comments

Comments
 (0)