Skip to content

Commit 6a09f4d

Browse files
committed
Use configuration resolver to replace standard resolver
Closes spring-projectsgh-28687
1 parent 12537c7 commit 6a09f4d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,11 +20,12 @@
2020
import java.nio.charset.StandardCharsets;
2121
import java.util.function.BiConsumer;
2222

23+
import org.springframework.boot.context.properties.source.ConfigurationPropertySources;
2324
import org.springframework.boot.system.ApplicationPid;
2425
import org.springframework.core.env.ConfigurableEnvironment;
26+
import org.springframework.core.env.ConfigurablePropertyResolver;
2527
import org.springframework.core.env.Environment;
2628
import org.springframework.core.env.PropertyResolver;
27-
import org.springframework.core.env.PropertySourcesPropertyResolver;
2829
import org.springframework.util.Assert;
2930

3031
/**
@@ -162,8 +163,7 @@ protected void apply(LogFile logFile, PropertyResolver resolver) {
162163

163164
private PropertyResolver getPropertyResolver() {
164165
if (this.environment instanceof ConfigurableEnvironment configurableEnvironment) {
165-
PropertySourcesPropertyResolver resolver = new PropertySourcesPropertyResolver(
166-
configurableEnvironment.getPropertySources());
166+
ConfigurablePropertyResolver resolver = ConfigurationPropertySources.createPropertyResolver(configurableEnvironment.getPropertySources());
167167
resolver.setConversionService(((ConfigurableEnvironment) this.environment).getConversionService());
168168
resolver.setIgnoreUnresolvableNestedPlaceholders(true);
169169
return resolver;

0 commit comments

Comments
 (0)