From 8b1b9ef9e55c1d16e03861c0611dfbb22d1ff251 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Mon, 12 May 2025 17:21:37 +0200 Subject: [PATCH] Stop redefining placeholder syntax constants in PlaceholderConfigurerSupport --- .../factory/config/PlaceholderConfigurerSupport.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java b/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java index 079543f6dc..bc9ef117c1 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/config/PlaceholderConfigurerSupport.java @@ -22,6 +22,7 @@ import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.BeanNameAware; import org.springframework.lang.Nullable; import org.springframework.util.StringValueResolver; +import org.springframework.util.SystemPropertyUtils; /** * Abstract base class for property resource configurers that resolve placeholders @@ -92,16 +93,16 @@ public abstract class PlaceholderConfigurerSupport extends PropertyResourceConfi implements BeanNameAware, BeanFactoryAware { /** Default placeholder prefix: {@value}. */ - public static final String DEFAULT_PLACEHOLDER_PREFIX = "${"; + public static final String DEFAULT_PLACEHOLDER_PREFIX = SystemPropertyUtils.PLACEHOLDER_PREFIX; /** Default placeholder suffix: {@value}. */ - public static final String DEFAULT_PLACEHOLDER_SUFFIX = "}"; + public static final String DEFAULT_PLACEHOLDER_SUFFIX = SystemPropertyUtils.PLACEHOLDER_SUFFIX; /** Default value separator: {@value}. */ - public static final String DEFAULT_VALUE_SEPARATOR = ":"; + public static final String DEFAULT_VALUE_SEPARATOR = SystemPropertyUtils.VALUE_SEPARATOR; /** Default escape character: {@code '\'}. */ - public static final Character DEFAULT_ESCAPE_CHARACTER = '\\'; + public static final Character DEFAULT_ESCAPE_CHARACTER = SystemPropertyUtils.ESCAPE_CHARACTER; /** Defaults to {@value #DEFAULT_PLACEHOLDER_PREFIX}. */