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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -