public class YamlPropertiesFactoryBean extends YamlProcessor implements org.springframework.beans.factory.FactoryBean<Properties>
environments:
dev:
url: http://dev.bar.com
name: Developer Setup
prod:
url: http://foo.bar.com
name: My Cool App
is transformed into these Properties:
environments.dev.url=http://dev.bar.com environments.dev.name=Developer Setup environments.prod.url=http://foo.bar.com environments.prod.name=My Cool AppLists are represented as comma-separated values (useful for simple String values) and also as property keys with
[] dereferencers, for example this YAML:
servers: - dev.bar.com - foo.bar.combecomes java Properties like this:
servers=dev.bar.com,foo.bar.com servers[0]=dev.bar.com servers[1]=foo.bar.com
YamlProcessor.DocumentMatcher, YamlProcessor.MatchCallback, YamlProcessor.MatchStatus, YamlProcessor.ResolutionMethod| Constructor and Description |
|---|
YamlPropertiesFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
Properties |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setSingleton(boolean singleton)
Set if a singleton should be created, or a new object on each request otherwise.
|
process, setDocumentMatchers, setMatchDefault, setResolutionMethod, setResourcespublic Properties getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<Properties>public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<Properties>public void setSingleton(boolean singleton)
true (a singleton).public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<Properties>Copyright © 2013. All rights reserved.