public class YamlPropertySourceLoader extends PropertiesPropertySourceLoader
PropertySource
.Constructor and Description |
---|
YamlPropertySourceLoader(YamlProcessor.DocumentMatcher... matchers)
Create a
YamlPropertySourceLoader instance with the specified matchers. |
Modifier and Type | Method and Description |
---|---|
protected Properties |
loadProperties(org.springframework.core.io.Resource resource) |
static YamlPropertySourceLoader |
matchAllLoader()
A property source loader that loads all properties and matches all documents.
|
static YamlPropertySourceLoader |
springProfileAwareLoader(String[] activeProfiles)
A property source loader that matches documents that have no explicit profile or
which have an explicit "spring.profiles.active" value in the current active
profiles.
|
boolean |
supports(org.springframework.core.io.Resource resource)
Returns
true if the Resource is supported. |
load
public YamlPropertySourceLoader(YamlProcessor.DocumentMatcher... matchers)
YamlPropertySourceLoader
instance with the specified matchers.matchers
- the document matcherspublic boolean supports(org.springframework.core.io.Resource resource)
PropertySourceLoader
true
if the Resource
is supported.supports
in interface PropertySourceLoader
supports
in class PropertiesPropertySourceLoader
protected Properties loadProperties(org.springframework.core.io.Resource resource) throws IOException
loadProperties
in class PropertiesPropertySourceLoader
IOException
public static YamlPropertySourceLoader matchAllLoader()
public static YamlPropertySourceLoader springProfileAwareLoader(String[] activeProfiles)
activeProfiles
- the active profiles to match independent of file contentsCopyright © 2013. All rights reserved.