Java 类org.springframework.core.SpringProperties 实例源码

项目:spring4-understanding    文件:SpringObjenesis.java   
/**
 * Create a new {@code SpringObjenesis} instance with the
 * given standard instantiator strategy.
 * @param strategy the instantiator strategy to use
 */
public SpringObjenesis(InstantiatorStrategy strategy) {
    this.strategy = (strategy != null ? strategy : new StdInstantiatorStrategy());

    // Evaluate the "spring.objenesis.ignore" property upfront...
    if (SpringProperties.getFlag(SpringObjenesis.IGNORE_OBJENESIS_PROPERTY_NAME)) {
        this.worthTrying = Boolean.FALSE;
    }
}
项目:spring    文件:SpringObjenesis.java   
/**
 * Create a new {@code SpringObjenesis} instance with the
 * given standard instantiator strategy.
 * @param strategy the instantiator strategy to use
 */
public SpringObjenesis(InstantiatorStrategy strategy) {
    this.strategy = (strategy != null ? strategy : new StdInstantiatorStrategy());

    // Evaluate the "spring.objenesis.ignore" property upfront...
    if (SpringProperties.getFlag(SpringObjenesis.IGNORE_OBJENESIS_PROPERTY_NAME)) {
        this.worthTrying = Boolean.FALSE;
    }
}
项目:easyooo-framework    文件:ResourcePropertiesUtilTest.java   
@Test
public void getInputStream(){

    ClassLoader cl = SpringProperties.class.getClassLoader();
    URL url = cl.getResource("defaults/jdbc.properties");
    if (url != null) {
        System.out.println("OK.");
    }else{
        System.out.println("failure.");
    }
}
项目:spring4-understanding    文件:StandardEnvironmentTests.java   
@Test
public void suppressGetenvAccessThroughSpringProperty() {
    SpringProperties.setProperty("spring.getenv.ignore", "true");
    assertTrue(environment.getSystemEnvironment().isEmpty());
    SpringProperties.setProperty("spring.getenv.ignore", null);
}
项目:spring4-understanding    文件:StandardEnvironmentTests.java   
@Test
public void suppressGetenvAccessThroughSpringFlag() {
    SpringProperties.setFlag("spring.getenv.ignore");
    assertTrue(environment.getSystemEnvironment().isEmpty());
    SpringProperties.setProperty("spring.getenv.ignore", null);
}
项目:class-guard    文件:StandardEnvironmentTests.java   
@Test
public void suppressGetenvAccessThroughSpringProperty() {
    SpringProperties.setProperty("spring.getenv.ignore", "true");
    assertTrue(environment.getSystemEnvironment().isEmpty());
    SpringProperties.setProperty("spring.getenv.ignore", null);
}
项目:class-guard    文件:StandardEnvironmentTests.java   
@Test
public void suppressGetenvAccessThroughSpringFlag() {
    SpringProperties.setFlag("spring.getenv.ignore");
    assertTrue(environment.getSystemEnvironment().isEmpty());
    SpringProperties.setProperty("spring.getenv.ignore", null);
}
项目:spring4-understanding    文件: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
 * @see SpringProperties#getFlag
 */
protected boolean suppressGetenvAccess() {
    return SpringProperties.getFlag(IGNORE_GETENV_PROPERTY_NAME);
}
项目:spring    文件: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
 * @see SpringProperties#getFlag
 */
protected boolean suppressGetenvAccess() {
    return SpringProperties.getFlag(IGNORE_GETENV_PROPERTY_NAME);
}
项目:class-guard    文件: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
 * @see SpringProperties#getFlag
 */
protected boolean suppressGetenvAccess() {
    return SpringProperties.getFlag(IGNORE_GETENV_PROPERTY_NAME);
}