Example usage for org.springframework.core SpringProperties getFlag

List of usage examples for org.springframework.core SpringProperties getFlag

Introduction

In this page you can find the example usage for org.springframework.core SpringProperties getFlag.

Prototype

public static boolean getFlag(String key) 

Source Link

Document

Retrieve the flag for the given property key.

Usage

From source file:org.springframework.core.env.AbstractEnvironment.java

/**
 * Determine whether to suppress {@link System#getenv()}/{@link System#getenv(String)}
 * access for the purposes of {@link #getSystemEnvironment()}.
 * <p>If this method returns {@code true}, an empty dummy Map will be used instead
 * of the regular system environment Map, never even trying to call {@code getenv}
 * and therefore avoiding security manager warnings (if any).
 * <p>The default implementation checks for the "spring.getenv.ignore" system property,
 * returning {@code true} if its value equals "true" in any case.
 * @see #IGNORE_GETENV_PROPERTY_NAME/*from  w  w  w.j av  a 2 s . co m*/
 * @see SpringProperties#getFlag
 */
protected boolean suppressGetenvAccess() {
    return SpringProperties.getFlag(IGNORE_GETENV_PROPERTY_NAME);
}