|
1 | 1 | /*
|
2 |
| - * Copyright 2012-2022 the original author or authors. |
| 2 | + * Copyright 2012-2023 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
20 | 20 | import java.nio.charset.StandardCharsets;
|
21 | 21 | import java.util.function.BiConsumer;
|
22 | 22 |
|
| 23 | +import org.springframework.boot.context.properties.source.ConfigurationPropertySources; |
23 | 24 | import org.springframework.boot.system.ApplicationPid;
|
24 | 25 | import org.springframework.core.env.ConfigurableEnvironment;
|
| 26 | +import org.springframework.core.env.ConfigurablePropertyResolver; |
25 | 27 | import org.springframework.core.env.Environment;
|
26 | 28 | import org.springframework.core.env.PropertyResolver;
|
27 |
| -import org.springframework.core.env.PropertySourcesPropertyResolver; |
28 | 29 | import org.springframework.util.Assert;
|
29 | 30 |
|
30 | 31 | /**
|
@@ -162,8 +163,7 @@ protected void apply(LogFile logFile, PropertyResolver resolver) {
|
162 | 163 |
|
163 | 164 | private PropertyResolver getPropertyResolver() {
|
164 | 165 | if (this.environment instanceof ConfigurableEnvironment configurableEnvironment) {
|
165 |
| - PropertySourcesPropertyResolver resolver = new PropertySourcesPropertyResolver( |
166 |
| - configurableEnvironment.getPropertySources()); |
| 166 | + ConfigurablePropertyResolver resolver = ConfigurationPropertySources.createPropertyResolver(configurableEnvironment.getPropertySources()); |
167 | 167 | resolver.setConversionService(((ConfigurableEnvironment) this.environment).getConversionService());
|
168 | 168 | resolver.setIgnoreUnresolvableNestedPlaceholders(true);
|
169 | 169 | return resolver;
|
|
0 commit comments