类 MapConfigurationPropertySource
java.lang.Object
org.springframework.boot.context.properties.source.MapConfigurationPropertySource
- 所有已实现的接口:
Iterable<ConfigurationPropertyName>
,ConfigurationPropertySource
,IterableConfigurationPropertySource
public class MapConfigurationPropertySource
extends Object
implements IterableConfigurationPropertySource
A
ConfigurationPropertySource
backed by a Map
and using standard name
mapping rules.- 从以下版本开始:
- 2.0.0
- 作者:
- Phillip Webb, Madhura Bhave
-
构造器概要
构造器构造器说明Create a new emptyMapConfigurationPropertySource
instance.MapConfigurationPropertySource
(Map<?, ?> map) Create a newMapConfigurationPropertySource
instance with entries copies from the specified map. -
方法概要
修饰符和类型方法说明Return a singleConfigurationProperty
from the source ornull
if no property can be found.Return the underlying source that is actually providing the properties.iterator()
Return an iterator for thenames
managed by this source.void
Add an individual entry.void
Add all entries from the specified map.stream()
Returns a sequentialStream
for thenames
managed by this source.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 java.lang.Iterable
forEach, spliterator
从接口继承的方法 org.springframework.boot.context.properties.source.IterableConfigurationPropertySource
containsDescendantOf, filter, withAliases, withPrefix
-
构造器详细资料
-
MapConfigurationPropertySource
public MapConfigurationPropertySource()Create a new emptyMapConfigurationPropertySource
instance. -
MapConfigurationPropertySource
Create a newMapConfigurationPropertySource
instance with entries copies from the specified map.- 参数:
map
- the source map
-
-
方法详细资料
-
putAll
Add all entries from the specified map.- 参数:
map
- the source map
-
put
Add an individual entry.- 参数:
name
- the namevalue
- the value
-
getUnderlyingSource
从接口复制的说明:ConfigurationPropertySource
Return the underlying source that is actually providing the properties.- 指定者:
getUnderlyingSource
在接口中ConfigurationPropertySource
- 返回:
- the underlying property source or
null
.
-
getConfigurationProperty
从接口复制的说明:ConfigurationPropertySource
Return a singleConfigurationProperty
from the source ornull
if no property can be found.- 指定者:
getConfigurationProperty
在接口中ConfigurationPropertySource
- 参数:
name
- the name of the property (must not benull
)- 返回:
- the associated object or
null
.
-
iterator
从接口复制的说明:IterableConfigurationPropertySource
Return an iterator for thenames
managed by this source.- 指定者:
iterator
在接口中Iterable<ConfigurationPropertyName>
- 指定者:
iterator
在接口中IterableConfigurationPropertySource
- 返回:
- an iterator (never
null
)
-
stream
从接口复制的说明:IterableConfigurationPropertySource
Returns a sequentialStream
for thenames
managed by this source.- 指定者:
stream
在接口中IterableConfigurationPropertySource
- 返回:
- a stream of names (never
null
)
-