类 SystemProfileValueSource
- java.lang.Object
- org.springframework.test.annotation.SystemProfileValueSource
- 所有已实现的接口:
ProfileValueSource
public class SystemProfileValueSource extends Object implements ProfileValueSource
Implementation ofProfileValueSource
which uses system properties as the underlying source.- 从以下版本开始:
- 2.0
- 作者:
- Rod Johnson, Sam Brannen
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 String
get(String key)
Get the profile value indicated by the specified key from the system properties.static SystemProfileValueSource
getInstance()
Obtain the canonical instance of this ProfileValueSource.
方法详细资料
getInstance
public static final SystemProfileValueSource getInstance()
Obtain the canonical instance of this ProfileValueSource.
get
public String get(String key)
Get the profile value indicated by the specified key from the system properties.- 指定者:
get
在接口中ProfileValueSource
- 参数:
key
- the name of the profile value- 返回:
- the String value of the profile value, or
null
if there is no profile value with that key - 另请参阅:
System.getProperty(String)