类 InfoPropertiesInfoContributor<T extends InfoProperties>
java.lang.Object
org.springframework.boot.actuate.info.InfoPropertiesInfoContributor<T>
- 类型参数:
T
- the type of theInfoProperties
to expose
- 所有已实现的接口:
InfoContributor
- 直接已知子类:
BuildInfoContributor
,GitInfoContributor
public abstract class InfoPropertiesInfoContributor<T extends InfoProperties>
extends Object
implements InfoContributor
A base
InfoContributor
to expose an InfoProperties
.- 从以下版本开始:
- 1.4.0
- 作者:
- Stephane Nicoll, Madhura Bhave
-
嵌套类概要
嵌套类修饰符和类型类说明static enum
Defines how properties should be exposed. -
构造器概要
构造器限定符构造器说明protected
InfoPropertiesInfoContributor
(T properties, InfoPropertiesInfoContributor.Mode mode) -
方法概要
修饰符和类型方法说明protected void
copyIfSet
(Properties target, String key) Copy the specified key to the targetProperties
if it is set.extractContent
(PropertySource<?> propertySource) Extract the raw content based on the specifiedPropertySource
.Extract the content to contribute to the info endpoint.protected final InfoPropertiesInfoContributor.Mode
getMode()
Return the mode that should be used to expose the content.getNestedMap
(Map<String, Object> map, String key) Return the nested map with the specified key or empty map if the specified map contains no mapping for the key.protected final T
Return the properties that this instance manages.protected void
postProcessContent
(Map<String, Object> content) Post-process the content to expose.protected void
Replace thevalue
for the specified key if the value is notnull
.protected PropertySource
<?> Return thePropertySource
to use based on the chosenInfoPropertiesInfoContributor.Mode
.protected abstract PropertySource
<?> Return aPropertySource
for theSIMPLE
mode.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 org.springframework.boot.actuate.info.InfoContributor
contribute
-
构造器详细资料
-
InfoPropertiesInfoContributor
-
-
方法详细资料
-
getProperties
Return the properties that this instance manages.- 返回:
- the info properties
-
getMode
Return the mode that should be used to expose the content.- 返回:
- the mode
-
toSimplePropertySource
Return aPropertySource
for theSIMPLE
mode.- 返回:
- the property source for the simple model
- 另请参阅:
-
generateContent
Extract the content to contribute to the info endpoint.- 返回:
- the content to expose
- 另请参阅:
-
extractContent
Extract the raw content based on the specifiedPropertySource
.- 参数:
propertySource
- the property source to use- 返回:
- the raw content
-
postProcessContent
Post-process the content to expose. Elements can be added, changed or removed.- 参数:
content
- the content to expose
-
toPropertySource
Return thePropertySource
to use based on the chosenInfoPropertiesInfoContributor.Mode
.- 返回:
- the property source
-
copyIfSet
Copy the specified key to the targetProperties
if it is set.- 参数:
target
- the target properties to updatekey
- the key
-
replaceValue
Replace thevalue
for the specified key if the value is notnull
.- 参数:
content
- the content to exposekey
- the property to replacevalue
- the new value
-
getNestedMap
Return the nested map with the specified key or empty map if the specified map contains no mapping for the key.- 参数:
map
- the contentkey
- the key of a nested map- 返回:
- the nested map
-