Discussion:
Setting default values in GUICE
vishesh kamdar
2016-08-01 22:02:51 UTC
Permalink
Like we do the following in Spring

@Value("${varName:0}")int varName;

Is there a way to do this using Google Guice?
--
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 google-guice+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/76bd45e8-af3e-4571-a3a7-cc55bfac9bd3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tim Boudreau
2016-11-01 20:02:22 UTC
Permalink
Guice doesn't do that out-of-the-box, but I wrote a micro-framework on top
of it that does (and there are others):

https://github.com/timboudreau/giulius

-Tim
Post by vishesh kamdar
Like we do the following in Spring
@Value("${varName:0}")int varName;
Is there a way to do this using Google Guice?
--
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 google-guice+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-guice.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/bd5b5b78-b399-490e-b507-b8c45103068a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...