What is the added values when compared to
https://github.com/google/guice/wiki/FrequentlyAskedQuestions#how-do-i-inject-configuration-parameters
?

It's not really clear to me.

Le jeu. 9 avr. 2015 à 19:55, Stranger in the Q <[email protected]> a
écrit :

> https://bitbucket.org/strangerintheq/guice-config
>
> Usage example:
>
> At first we have a properties file 'config.properties':
>
> test.key=test value
>
> And we want to inject this value like this:
>
> @Inject@Config( Property.TEST_KEY )private String injectedValue;
>
> We need to load contents of file 'config.properties' into
> java.util.Properties and pass it to Config module:
>
> Properties props = new Properties();props.load(...);Module configModule = new 
> ConfigModule( props, Property.values() );
>
> ... and injecting:
>
> Injector injector = Guice.createInjector( configModule );TestClass testClass 
> = injector.getInstance( TestClass.class );String injectedValue = 
> testClass.getInjectedValue();
>
> injected value will be 'test value'...
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-guice/28f51f39-e29a-4f9c-a9ea-c70749adb8f6%40googlegroups.com
> <https://groups.google.com/d/msgid/google-guice/28f51f39-e29a-4f9c-a9ea-c70749adb8f6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/CAORw%3DcPGbwJPaK%3DSwF0U2B2be-sAX%2BwWeaH0Z43HEgxgh6xPHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to