类 PropertySourceOrigin

java.lang.Object
org.springframework.boot.origin.PropertySourceOrigin
所有已实现的接口:
Origin, OriginProvider

public class PropertySourceOrigin extends Object implements Origin, OriginProvider
从以下版本开始:
2.0.0
作者:
Phillip Webb
  • 构造器详细资料

    • PropertySourceOrigin

      public PropertySourceOrigin(PropertySource<?> propertySource, String propertyName)
      Create a new PropertySourceOrigin instance.
      参数:
      propertySource - the property source
      propertyName - the name from the property source
    • PropertySourceOrigin

      public PropertySourceOrigin(PropertySource<?> propertySource, String propertyName, Origin origin)
      Create a new PropertySourceOrigin instance.
      参数:
      propertySource - the property source
      propertyName - the name from the property source
      origin - the actual origin for the source if known
      从以下版本开始:
      3.2.8
  • 方法详细资料

    • getPropertySource

      public PropertySource<?> getPropertySource()
      Return the origin PropertySource.
      返回:
      the origin property source
    • getPropertyName

      public String getPropertyName()
      Return the property name that was used when obtaining the original value from the property source.
      返回:
      the origin property name
    • getOrigin

      public Origin getOrigin()
      Return the actual origin for the source if known.
      指定者:
      getOrigin 在接口中 OriginProvider
      返回:
      the actual source origin
      从以下版本开始:
      3.2.8
    • getParent

      public Origin getParent()
      从接口复制的说明: Origin
      Return the parent origin for this instance if there is one. The parent origin provides the origin of the item that created this one.
      指定者:
      getParent 在接口中 Origin
      返回:
      the parent origin or null
      另请参阅:
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • get

      public static Origin get(PropertySource<?> propertySource, String name)
      Get an Origin for the given PropertySource and propertyName. Will either return an OriginLookup result or a PropertySourceOrigin.
      参数:
      propertySource - the origin property source
      name - the property name
      返回:
      the property origin