org.springframework.boot.env

Class YamlPropertySourceLoader

  • All Implemented Interfaces:
    PropertySourceLoader


    public class YamlPropertySourceLoader
    extends Object
    implements PropertySourceLoader
    Strategy to load '.yml' (or '.yaml') files into a PropertySource.
    Author:
    Dave Syer, Phillip Webb, Andy Wilkinson
    • Constructor Detail

      • YamlPropertySourceLoader

        public YamlPropertySourceLoader()
    • Method Detail

      • load

        public org.springframework.core.env.PropertySource<?> load(String name,
                                                          org.springframework.core.io.Resource resource,
                                                          String profile)
                                                            throws IOException
        Description copied from interface: PropertySourceLoader
        Load the resource into a property source.
        Specified by:
        load in interface PropertySourceLoader
        Parameters:
        name - the name of the property source
        resource - the resource to load
        profile - the name of the profile to load or null. The profile can be used to load multi-document files (such as YAML). Simple property formats should null when asked to load a profile.
        Returns:
        a property source or null
        Throws:
        IOException

Copyright © 2015 Pivotal Software, Inc.. All rights reserved.