java - Injections in guice don't work everywhere -


i'm trying inject service google guice @inject annotation:

 @inject  service service; 

this inject working not in places. when doesn't work catch null pointer. can problem ? obviously, attemps within single project

if not create instances .getinstance() nothing injected. annotation not magic.

you have use requeststaticinjection() on static references annotated @inject.

this explained in extreme detail in guice documentation.


Comments

Popular posts from this blog

What Are The Best Universities In The World?

The Ten Most Livable Cities In The World

Hard vs. Soft Water: What's The Difference?