Created
May 23, 2012 02:24
-
-
Save dehora/2772882 to your computer and use it in GitHub Desktop.
n resources with dropwizard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object ServiceMain extends ScalaService[ServiceConfiguration]("record-service") { | |
def initialize(configuration: ServiceConfiguration, environment: Environment) { | |
val injector: Injector = Guice.createInjector( | |
new ConfigModule(configuration), | |
new NotifyModule(), | |
new AccountModule(), | |
new CollectionModule() | |
) | |
// root resource routing not needed, just add the things in and give them paths | |
environment.addResource(injector.getInstance(classOf[AccountResource])) | |
environment.addResource(injector.getInstance(classOf[CollectionResource])) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment