I'm writing an API module.
while developing I use junit to run the code
however eventually some other modules will use my API.
I want to use dependency injection pattern
a) Where should be my main entry where I init all the dependencies or global utils?
b) I thought it be neater using guice injector,
but where should I init it?
It depends on what you're trying to do. I find, with
BoundFieldModule
and the@Bind
annotation in Guice 4.0, that it's generally easiest to just use Guice directly. For example: