类 InfoProperties
- java.lang.Object
- org.springframework.boot.info.InfoProperties
- 所有已实现的接口:
Iterable<InfoProperties.Entry>
- 直接已知子类:
BuildProperties
,GitProperties
public class InfoProperties extends Object implements Iterable<InfoProperties.Entry>
Base class for components exposing unstructured data with dedicated methods for well known keys.- 从以下版本开始:
- 1.4.0
嵌套类概要
嵌套类 修饰符和类型 类 说明 class
InfoProperties.Entry
Property entry.
构造器概要
构造器 构造器 说明 InfoProperties(Properties entries)
Create an instance with the specified entries.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
get(String key)
Return the value of the specified property ornull
.Instant
getInstant(String key)
Iterator<InfoProperties.Entry>
iterator()
org.springframework.core.env.PropertySource<?>
toPropertySource()
Return aPropertySource
of this instance.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
构造器详细资料
InfoProperties
public InfoProperties(Properties entries)
Create an instance with the specified entries.- 参数:
entries
- the information to expose
方法详细资料
get
public String get(String key)
Return the value of the specified property ornull
.- 参数:
key
- the key of the property- 返回:
- the property value
getInstant
public Instant getInstant(String key)
Return the value of the specified property as anInstant
ornull
if the value is not a validLong
representation of an epoch time.- 参数:
key
- the key of the property- 返回:
- the property value
iterator
public Iterator<InfoProperties.Entry> iterator()
- 指定者:
iterator
在接口中Iterable<InfoProperties.Entry>
toPropertySource
public org.springframework.core.env.PropertySource<?> toPropertySource()
Return aPropertySource
of this instance.- 返回:
- a
PropertySource