org.springframework.boot.env

Class PropertiesPropertySourceLoader

  • All Implemented Interfaces:
    PropertySourceLoader


    public class PropertiesPropertySourceLoader
    extends Object
    implements PropertySourceLoader
    Strategy to load '.properties' files into a PropertySource.
    Author:
    Dave Syer, Phillip Webb
    • Constructor Detail

      • PropertiesPropertySourceLoader

        public PropertiesPropertySourceLoader()
    • 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 - if the source cannot be loaded

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