diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java index 7852b7e57f14..c4da23bdc3b0 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2023 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. @@ -20,11 +20,12 @@ import java.nio.charset.StandardCharsets; import java.util.function.BiConsumer; +import org.springframework.boot.context.properties.source.ConfigurationPropertySources; import org.springframework.boot.system.ApplicationPid; import org.springframework.core.env.ConfigurableEnvironment; +import org.springframework.core.env.ConfigurablePropertyResolver; import org.springframework.core.env.Environment; import org.springframework.core.env.PropertyResolver; -import org.springframework.core.env.PropertySourcesPropertyResolver; import org.springframework.util.Assert; /** @@ -162,8 +163,7 @@ protected void apply(LogFile logFile, PropertyResolver resolver) { private PropertyResolver getPropertyResolver() { if (this.environment instanceof ConfigurableEnvironment configurableEnvironment) { - PropertySourcesPropertyResolver resolver = new PropertySourcesPropertyResolver( - configurableEnvironment.getPropertySources()); + ConfigurablePropertyResolver resolver = ConfigurationPropertySources.createPropertyResolver(configurableEnvironment.getPropertySources()); resolver.setConversionService(((ConfigurableEnvironment) this.environment).getConversionService()); resolver.setIgnoreUnresolvableNestedPlaceholders(true); return resolver;