I have doubts about eye injections. Is it possible to enter the value of the @named variable in a static variable?
I tried
@Provides @Named("emp.id") public Integer getEmpId() { return 2; }
and tried to enter this value into a static variable, for example
@Inject @Named("emp.id") private static Integer id;
But the id value returns null. When I removed the static modifier, the identifier gave the value 1.
What is really going on here?
source share