Setting default values in GUICE

43 views
Skip to first unread message

vishesh kamdar

unread,
Aug 1, 2016, 6:02:51 PM8/1/16
to google-guice

Like we do the following in Spring

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

Is there a way to do this using Google Guice?

Tim Boudreau

unread,
Nov 1, 2016, 4:02:22 PM11/1/16
to google-guice
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
Reply all
Reply to author
Forward
0 new messages