On Sunday, April 6, 2014 11:34:26 AM UTC+2, Prashant Kumar wrote:
>
> Hi,
> Is there any way to use single properties file instance throughout the
> project and i want to use the key value pair in different file and print
> the value in System.out.println(Names.named("key")) ; but i am not able to
> access the value with key
>
> Please help me because i need to save memory of server so i can't use @
> Inject @Named(key) String prop;
>
Not sure, that I get you right, but you should be able to do the lookup
programmatically udinf
Key key = Key.get(type, Names.named(propertyValue));
injector.getInstance(key);
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/d/optout.