类 PropertyPlaceholderConfigurer

    • 方法详细资料

      • setSearchSystemEnvironment

        public void setSearchSystemEnvironment​(boolean searchSystemEnvironment)
        已过时。
        Set whether to search for a matching system environment variable if no matching system property has been found. Only applied when "systemPropertyMode" is active (i.e. "fallback" or "override"), right after checking JVM system properties.

        Default is "true". Switch this setting off to never resolve placeholders against system environment variables. Note that it is generally recommended to pass external values in as JVM system properties: This can easily be achieved in a startup script, even for existing environment variables.

        另请参阅:
        setSystemPropertiesMode(int), System.getProperty(String), System.getenv(String)
      • resolvePlaceholder

        @Nullable
        protected String resolvePlaceholder​(String placeholder,
                                            Properties props,
                                            int systemPropertiesMode)
        已过时。
        Resolve the given placeholder using the given properties, performing a system properties check according to the given mode.

        The default implementation delegates to resolvePlaceholder (placeholder, props) before/after the system properties check.

        Subclasses can override this for custom resolution strategies, including customized points for the system properties check.

        参数:
        placeholder - the placeholder to resolve
        props - the merged properties of this configurer
        systemPropertiesMode - the system properties mode, according to the constants in this class
        返回:
        the resolved value, of null if none
        另请参阅:
        setSystemPropertiesMode(int), System.getProperty(java.lang.String), resolvePlaceholder(String, java.util.Properties)
      • resolvePlaceholder

        @Nullable
        protected String resolvePlaceholder​(String placeholder,
                                            Properties props)
        已过时。
        Resolve the given placeholder using the given properties. The default implementation simply checks for a corresponding property key.

        Subclasses can override this for customized placeholder-to-key mappings or custom resolution strategies, possibly just using the given properties as fallback.

        Note that system properties will still be checked before respectively after this method is invoked, according to the system properties mode.

        参数:
        placeholder - the placeholder to resolve
        props - the merged properties of this configurer
        返回:
        the resolved value, of null if none
        另请参阅:
        setSystemPropertiesMode(int)