本文整理汇总了Java中org.springframework.core.SpringProperties.getFlag方法的典型用法代码示例。如果您正苦于以下问题:Java SpringProperties.getFlag方法的具体用法?Java SpringProperties.getFlag怎么用?Java SpringProperties.getFlag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.core.SpringProperties
的用法示例。
在下文中一共展示了SpringProperties.getFlag方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SpringObjenesis
import org.springframework.core.SpringProperties; //导入方法依赖的package包/类
/**
* 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;
}
}
示例2: suppressGetenvAccess
import org.springframework.core.SpringProperties; //导入方法依赖的package包/类
/**
* 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);
}