0
ここに問題があります。私は2つの可変のモジュールを持っていると仮定しましょう:Scaldi:typesafe設定で定義されたバインディングを見つけることができませんでした
リソース/ application.conf:
どこか私はコード内のdb { url="postgres url" username="db_user" password="db_password" driver="cc" }
:
implicit val inj = TypesafeConfigInjector() :: new AppModule
class DbModule extends Module { bind[JdbcBackend#Database] toProvider
inject[JdbcDriver].backend.Database.forURL(
inject[String]("db.url"),
inject[String]("db.username"),
inject[String]("db.password"), null,
inject[String]("db.driver")
) }
、ここでは、対応するconfigです
ただし、このインジェクタでは次の例外があります。
caldi.InjectException: No binding found with following identifiers:
* TypeTagIdentifier(String) * StringIdentifier(db.url)