Class SystemProfileValueSource
- java.lang.Object
- org.springframework.test.annotation.SystemProfileValueSource
- All Implemented Interfaces:
ProfileValueSource
public final class SystemProfileValueSource extends Object implements ProfileValueSource
Implementation ofProfileValueSourcewhich uses system properties as the underlying source.- Since:
- 2.0
- Author:
- Rod Johnson, Sam Brannen
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringget(String key)Get the profile value indicated by the specified key from the system properties.static SystemProfileValueSourcegetInstance()Obtain the canonical instance of this ProfileValueSource.
Method Detail
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.- Specified by:
getin interfaceProfileValueSource- Parameters:
key- the name of the profile value- Returns:
- the String value of the profile value, or
nullif there is no profile value with that key - See Also:
System.getProperty(String)