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, Madhura Bhave
    • Constructor Detail

      • PropertiesPropertySourceLoader

        public PropertiesPropertySourceLoader()
    • Method Detail

      • load

        public List<org.springframework.core.env.PropertySource<?>> load(String name,
                                                                         org.springframework.core.io.Resource resource)
                                                                  throws IOException
        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 or each document in the resource.
        Specified by:
        load in interface PropertySourceLoader
        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

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