diff --git a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java index 97bbfc32ba..3043c47f19 100644 --- a/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java +++ b/spring-context/src/main/java/org/springframework/context/support/PropertySourcesPlaceholderConfigurer.java @@ -25,7 +25,6 @@ import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; import org.springframework.beans.factory.config.PlaceholderConfigurerSupport; import org.springframework.context.EnvironmentAware; import org.springframework.core.convert.ConversionService; -import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.core.env.ConfigurableEnvironment; import org.springframework.core.env.ConfigurablePropertyResolver; import org.springframework.core.env.Environment; @@ -270,11 +269,7 @@ public class PropertySourcesPlaceholderConfigurer extends PlaceholderConfigurerS if (value instanceof String string) { return string; } - ConversionService conversionService = super.source.getConversionService(); - if (conversionService == null) { - conversionService = DefaultConversionService.getSharedInstance(); - } - return conversionService.convert(value, String.class); + return super.source.getConversionService().convert(value, String.class); } @Override