Package ninja.utils
Class NinjaPropertiesImpl.Builder
- java.lang.Object
-
- ninja.utils.NinjaPropertiesImpl.Builder
-
- Enclosing class:
- NinjaPropertiesImpl
public static class NinjaPropertiesImpl.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NinjaPropertiesImpl
build()
NinjaPropertiesImpl.Builder
externalConfiguration(String externalConfiguration)
A path pointing to the location of an external configuration.NinjaPropertiesImpl.Builder
overrideProperties(Map<String,String> overrideProperties)
These properties will override any other properties.NinjaPropertiesImpl.Builder
withMode(NinjaMode ninjaMode)
-
-
-
Method Detail
-
withMode
public NinjaPropertiesImpl.Builder withMode(NinjaMode ninjaMode)
-
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
-
build
public NinjaPropertiesImpl build()
-
-