spring-framework / org.springframework.beans.factory.config / PropertyPlaceholderConfigurer / setSearchSystemEnvironment

setSearchSystemEnvironment

open fun setSearchSystemEnvironment(searchSystemEnvironment: Boolean): Unit

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.

NOTE: Access to environment variables does not work on the Sun VM 1.4, where the corresponding System#getenv support was disabled - before it eventually got re-enabled for the Sun VM 1.5. Please upgrade to 1.5 (or higher) if you intend to rely on the environment variable support.

See Also
#setSystemPropertiesModejava.lang.System#getProperty(String)java.lang.System#getenv(String)