开发者

Scala and Annotation

开发者 https://www.devze.com 2023-01-17 13:29 出处:网络
Just thinking of 开发者_JAVA技巧implementing Guice in scala Any sample code ?Unless you specifically need Guice to add Scala to an existing Java-based project that uses framework, I\'d advocate that

Just thinking of 开发者_JAVA技巧implementing Guice in scala

Any sample code ?


Unless you specifically need Guice to add Scala to an existing Java-based project that uses framework, I'd advocate that you just use built-in language features instead.

Traits and implicits can give you all the Dependency Injection you'll need. You might also want to search online for the Cake pattern.


This post about DI in Scala will be able to help you to get going with Guice. See Using Google Guice topic.

0

精彩评论

暂无评论...
验证码 换一张
取 消