Package ninja.utils

Class NinjaPropertiesImpl.Builder

    • Method Detail

      • externalConfiguration

        public NinjaPropertiesImpl.Builder externalConfiguration​(String externalConfiguration)
        A path pointing to the location of an external configuration. This external configuration will override any other properties like for instance conf/application.conf. ONLY properties set in overrideProperties(..) have higher priority and will NOT be overwritten.
        Parameters:
        externalConfiguration - The path of an external configuration. For instance "conf/heroku.conf".
        Returns:
        this instance for chaining
      • overrideProperties

        public NinjaPropertiesImpl.Builder overrideProperties​(Map<String,​String> overrideProperties)
        These properties will override any other properties. It overwrites properties in conf/application.conf or anything set via withExternalConfiguration(..). This is very useful in tests where you want to set certain properties like a jdbc connection based on a url that gets defined when the testcontainer gets started. The key should be written in a dot-separated format. Eg "application.server.url".
        Parameters:
        overrideProperties - A map with keys and values that will overwrite any previously set properties. These properties will have the highest priority and will be present when the server is running.
        Returns:
        this instance for chaining