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

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

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

The Ten Most Livable Cities In The World