open class YamlMapFactoryBean : YamlProcessor, FactoryBean<MutableMap<String, Any>>, InitializingBean
Factory for a Map that reads from a YAML source, preserving the YAML-declared value types and their structure.
YAML is a nice human-readable format for configuration, and it has some useful hierarchical properties. It's more or less a superset of JSON, so it has a lot of similar features.
If multiple resources are provided the later ones will override entries in the earlier ones hierarchically; that is, all entries with the same nested key of type Map at any depth are merged. For example:
foo: bar: one: two three: four plus (later in the list) foo: bar: one: 2 five: six results in an effective input of foo: bar: one: 2 three: four five: six Note that the value of "foo" in the first document is not simply replaced with the value in the second, but its nested values are merged.
Author
Dave Syer
Author
Juergen Hoeller
Since
4.1
YamlMapFactoryBean()
Factory for a YAML is a nice human-readable format for configuration, and it has some useful hierarchical properties. It's more or less a superset of JSON, so it has a lot of similar features. If multiple resources are provided the later ones will override entries in the earlier ones hierarchically; that is, all entries with the same nested key of type plus (later in the list) results in an effective input of Note that the value of "foo" in the first document is not simply replaced with the value in the second, but its nested values are merged.
|
open fun afterPropertiesSet(): Unit |
|
open fun getObject(): MutableMap<String, Any> |
|
open fun getObjectType(): Class<*> |
|
open fun isSingleton(): Boolean |
|
open fun setSingleton(singleton: Boolean): Unit
Set if a singleton should be created, or a new object on each request otherwise. Default is |