类 PropertyPlaceholderHelper


  • public class PropertyPlaceholderHelper
    extends Object
    用于处理包含占位符值的字符串的实用程序类。占位符采用 {name} 的形式。使用 PropertyPlaceholderHelper,可以将这些占位符替换为用户提供的值

    参考spring

    作者:
    思追(shaco)
    • 构造器详细资料

      • PropertyPlaceholderHelper

        public PropertyPlaceholderHelper​(String placeholderPrefix,
                                         String placeholderSuffix)
        参数:
        placeholderPrefix - 表示占位符开头的前缀
        placeholderSuffix - 表示占位符结尾的后缀
      • PropertyPlaceholderHelper

        public PropertyPlaceholderHelper​(@NotNull
                                         @NotNull String placeholderPrefix,
                                         @NotNull
                                         @NotNull String placeholderSuffix,
                                         @Nullable
                                         @Nullable String valueSeparator,
                                         boolean ignoreUnresolvablePlaceholders)
        参数:
        placeholderPrefix - 表示占位符开头的前缀
        placeholderSuffix - 表示占位符结尾的后缀
        valueSeparator - 占位符变量和关联的默认值之间的分隔字符
        ignoreUnresolvablePlaceholders - 指示是应忽略不可解析的占位符 (true) 还是导致异常 (false