Package org.springframework.boot.env
Class YamlPropertySourceLoader
java.lang.Object
org.springframework.boot.env.YamlPropertySourceLoader
- All Implemented Interfaces:
PropertySourceLoader
Strategy to load '.yml' (or '.yaml') files into a
PropertySource
.- Since:
- 1.0.0
- Author:
- Dave Syer, Phillip Webb, Andy Wilkinson
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Returns the file extensions that the loader supports (excluding the '.').List<PropertySource<?>>
Load the resource into one or more property sources.
-
Constructor Details
-
YamlPropertySourceLoader
public YamlPropertySourceLoader()
-
-
Method Details
-
getFileExtensions
Description copied from interface:PropertySourceLoader
Returns the file extensions that the loader supports (excluding the '.').- Specified by:
getFileExtensions
in interfacePropertySourceLoader
- Returns:
- the file extensions
-
load
Description copied from interface:PropertySourceLoader
Load the resource into one or more property sources. Implementations may either return a list containing a single source, or in the case of a multi-document format such as yaml a source for each document in the resource.- Specified by:
load
in interfacePropertySourceLoader
- Parameters:
name
- the root name of the property source. If multiple documents are loaded an additional suffix should be added to the name for each source loaded.resource
- the resource to load- Returns:
- a list property sources
- Throws:
IOException
- if the source cannot be loaded
-