类 PropertySourceOrigin
- java.lang.Object
- org.springframework.boot.origin.PropertySourceOrigin
- 所有已实现的接口:
Origin
public class PropertySourceOrigin extends Object implements Origin
Origin
from aPropertySource
.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 PropertySourceOrigin(org.springframework.core.env.PropertySource<?> propertySource, String propertyName)
Create a newPropertySourceOrigin
instance.
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 static Origin
get(org.springframework.core.env.PropertySource<?> propertySource, String name)
String
getPropertyName()
Return the property name that was used when obtaining the original value from theproperty source
.org.springframework.core.env.PropertySource<?>
getPropertySource()
Return the originPropertySource
.String
toString()
构造器详细资料
PropertySourceOrigin
public PropertySourceOrigin(org.springframework.core.env.PropertySource<?> propertySource, String propertyName)
Create a newPropertySourceOrigin
instance.- 参数:
propertySource
- the property sourcepropertyName
- the name from the property source
方法详细资料
getPropertySource
public org.springframework.core.env.PropertySource<?> getPropertySource()
Return the originPropertySource
.- 返回:
- the origin property source
getPropertyName
public String getPropertyName()
Return the property name that was used when obtaining the original value from theproperty source
.- 返回:
- the origin property name
get
public static Origin get(org.springframework.core.env.PropertySource<?> propertySource, String name)
Get anOrigin
for the givenPropertySource
andpropertyName
. Will either return anOriginLookup
result or aPropertySourceOrigin
.- 参数:
propertySource
- the origin property sourcename
- the property name- 返回:
- the property origin