There are many libraries or approaches for doing dependency injection in Scala.
Libraries:
Design Patterns:
The main differences between Grafter and other libraries are the following:
Grafter components directly have @reader
annotation which provide a way to “wire” them with their dependencies once an application configuration is available. Other libraries generally require a separate “module” to declare those “bindings”
in Grafter each interface needs to have at least a default implementation. This is not required with other libraries
there is no “interceptors” or “scoping” in Grafter. The only thing you can do is to modify
or replace
components
Total for specification Comparisons | |
---|---|
Finished in | 46 ms |
Results | 0 example, 0 failure, 0 error |