类 YamlPropertySourceLoader
- java.lang.Object
- org.springframework.boot.env.YamlPropertySourceLoader
- 所有已实现的接口:
PropertySourceLoader
public class YamlPropertySourceLoader extends Object implements PropertySourceLoader
Strategy to load '.yml' (or '.yaml') files into aPropertySource
.
构造器概要
构造器 构造器 说明 YamlPropertySourceLoader()
构造器详细资料
YamlPropertySourceLoader
public YamlPropertySourceLoader()
方法详细资料
getFileExtensions
public String[] getFileExtensions()
从接口复制的说明:PropertySourceLoader
Returns the file extensions that the loader supports (excluding the '.').- 指定者:
getFileExtensions
在接口中PropertySourceLoader
- 返回:
- the file extensions
load
public org.springframework.core.env.PropertySource<?> load(String name, org.springframework.core.io.Resource resource, String profile) throws IOException
从接口复制的说明:PropertySourceLoader
Load the resource into a property source.- 指定者:
load
在接口中PropertySourceLoader
- 参数:
name
- the name of the property sourceresource
- the resource to loadprofile
- the name of the profile to load ornull
. The profile can be used to load multi-document files (such as YAML). Simple property formats shouldnull
when asked to load a profile.- 返回:
- a property source or
null
- 抛出:
IOException
- if the source cannot be loaded