jw3 / akka-injects

Dependency Injection for Akka using Guice
Apache License 2.0
3 stars 4 forks source link

Named bindings for configuration values #6

Closed jw3 closed 8 years ago

jw3 commented 8 years ago

Configuration values can be @Named bound

So if you had a config

  app {
    net {
      host = "foo"
      port = 1234
    }
  }

Injections would look something like

val host: String = inject[String] named "app.net.host"
val port: Int = inject[Int] named "app.net.port"