Use ConversionService from Environment in PropertySourcesPlaceholderConfigurer

This commit fixes a regression in PropertySourcesPlaceholderConfigurer
that was introduced in Spring Framework 6.2.7.

Specifically, this commit reinstates automatic String-conversion of
values from PropertySources in the Environment using the
ConversionService configured in the Environment.

See gh-34861
Closes gh-34936
This commit is contained in:
Sam Brannen
2025-05-26 18:28:47 +02:00
parent d9e261aecd
commit 90be94a4a5
2 changed files with 28 additions and 5 deletions

View File

@@ -25,7 +25,6 @@ import java.util.Properties;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
@@ -98,7 +97,6 @@ class PropertySourcesPlaceholderConfigurerTests {
* used by the {@code Environment} is applied during placeholder resolution
* against a {@link PropertySource} registered in the {@code Environment}.
*/
@Disabled("Disabled until gh-34936 is resolved")
@Test // gh-34936
void replacementFromEnvironmentPropertiesWithConversion() {
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();