Class Loader


  • public class Loader
    extends Object
    Loads the configuration from known/expected locations.

    Defines the loading order of resources and files.

    • Constructor Detail

    • Method Detail

      • load

        public Properties load()
        Provides properties by reading known locations.

        Main configuration

        Firstly loads from main resources

           - application.properties
           - application.yaml
         

        Then loads from local files

           - application.properties
           - application.yaml
         

        Then loads from environment variable PROPS_FILE

        Then loads from system property props.file

        Then loads from load.properties

        Test configuration

        Once the main configuration is read it will try to read common test configuration. This will only be successful if the test resources are available (i.e. running tests).

        Loads from test resources

           - application-test.properties
           - application-test.yaml