private static Config config() { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); Properties properties = System.getProperties(); scala.collection.immutable.Map<String, Object> directSettings = scala.collection.immutable.Map$.MODULE$.empty(); // We are allowing missing application conf because it can handle both cases. boolean allowMissingApplicationConf = true; // Using play.api.Configuration.load because it is more consistent with how the // actual configuration is loaded for the application. return play.api.Configuration.load(classLoader, properties, directSettings, allowMissingApplicationConf).underlying(); }
private static Config config() { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); Properties properties = System.getProperties(); scala.collection.immutable.Map<String, Object> directSettings = scala.collection.immutable.Map$.MODULE$.empty(); // We are allowing missing application conf because it can handle both cases. boolean allowMissingApplicationConf = true; // Using play.api.Configuration.load because it is more consistent with how the // actual configuration is loaded for the application. return play.api.Configuration.load(classLoader, properties, directSettings, allowMissingApplicationConf).underlying(); }
private static Config config() { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); Properties properties = System.getProperties(); scala.collection.immutable.Map<String, Object> directSettings = scala.collection.immutable.Map$.MODULE$.empty(); // We are allowing missing application conf because it can handle both cases. boolean allowMissingApplicationConf = true; // Using play.api.Configuration.load because it is more consistent with how the // actual configuration is loaded for the application. return play.api.Configuration.load(classLoader, properties, directSettings, allowMissingApplicationConf).underlying(); }
/** * Load a new configuration from an environment. */ public static Configuration load(Environment env) { return new Configuration(play.api.Configuration.load(env.underlying())); }
/** * The context for loading an application. * * @param environment the application environment * @param initialSettings the initial settings. These settings are merged with the settings from the loaded * configuration files, and together form the initialConfiguration provided by the context. It * is intended for use in dev mode, to allow the build system to pass additional configuration * into the application. */ public Context(Environment environment, Map<String,Object> initialSettings) { this.underlying = new play.api.ApplicationLoader.Context( environment.underlying(), scala.Option.empty(), new play.core.DefaultWebCommands(), play.api.Configuration.load(environment.underlying(), play.libs.Scala.asScala(initialSettings))); }
/** * The context for loading an application. * * @param environment the application environment * @param initialSettings the initial settings. These settings are merged with the settings from the loaded * configuration files, and together form the initialConfiguration provided by the context. It * is intended for use in dev mode, to allow the build system to pass additional configuration * into the application. */ public Context(Environment environment, Map<String, Object> initialSettings) { this.underlying = new play.api.ApplicationLoader.Context( environment.asScala(), play.api.Configuration.load(environment.asScala(), play.libs.Scala.asScala(initialSettings)), new DefaultApplicationLifecycle(), scala.Option.empty()); }
/** * The context for loading an application. * * @param environment the application environment * @param initialSettings the initial settings. These settings are merged with the settings from the loaded * configuration files, and together form the initialConfiguration provided by the context. It * is intended for use in dev mode, to allow the build system to pass additional configuration * into the application. */ public Context(Environment environment, Map<String, Object> initialSettings) { this.underlying = new play.api.ApplicationLoader.Context( environment.asScala(), play.api.Configuration.load(environment.asScala(), play.libs.Scala.asScala(initialSettings)), new DefaultApplicationLifecycle(), scala.Option.empty()); }
/** * The context for loading an application. * * @param environment the application environment * @param initialSettings the initial settings. These settings are merged with the settings from the loaded * configuration files, and together form the initialConfiguration provided by the context. It * is intended for use in dev mode, to allow the build system to pass additional configuration * into the application. */ public Context(Environment environment, Map<String, Object> initialSettings) { this.underlying = new play.api.ApplicationLoader.Context( environment.asScala(), play.api.Configuration.load(environment.asScala(), play.libs.Scala.asScala(initialSettings)), new DefaultApplicationLifecycle(), scala.Option.empty()); }