public static interface Jooby.Module
routes
, Parser
,
Renderer
, and any other application specific service or contract of your choice.
It is similar to Module
except for the callback method receives a
Env
, Config
and Binder
.
A module can provide his own set of properties through the config()
method. By
default, this method returns an empty config object.
use(new M1()); use(new M2()); use(new M3());Previous example had the following order (first-listed are higher priority):
A module can provide start/stop methods in order to start or close resources.
Jooby.use(Jooby.Module)
Modifier and Type | Method and Description |
---|---|
default com.typesafe.config.Config |
config() |
void |
configure(Env env,
com.typesafe.config.Config conf,
com.google.inject.Binder binder)
Configure and produces bindings for the underlying application.
|
default com.typesafe.config.Config config()
void configure(Env env, com.typesafe.config.Config conf, com.google.inject.Binder binder)
application env
and/or the current
application properties available from Config
.env
- The current application's env. Not null.conf
- The current config object. Not null.binder
- A guice binder. Not null.Copyright © 2015. All rights reserved.