child injector per request On Friday, June 27, 2014 5:48:23 PM UTC-3, scl wrote: > > Do you create a new injector (or childinjector) for every request? > Am 27.06.2014 22:02 schrieb Edgar Espina <[email protected] > <javascript:>>: > > Hi, > > I'm using Guice to inject HTTP Request parameters (I'm not using > guice-servlet) and I will like to do things like: > > public class Command { >> public Command(@Named("name") String name) { >> } >> } > > > Here "name" is an HTTP parameter and I'm able to bind it when present. > > The problem (of course) is when that parameter isn't present or sent and > want to have a default value for it. > > I know isn't possible to inject something without a binding and it's OK. > So what I'm asking here is feedback on how to deal with this? and/or an > alternate solution? > > Thanks, > > edgar > > -- > 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] <javascript:>. > To post to this group, send email to [email protected] > <javascript:>. > 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/4a16405b-e29f-4c1b-820c-7f755bd79b77%40googlegroups.com > > <https://groups.google.com/d/msgid/google-guice/4a16405b-e29f-4c1b-820c-7f755bd79b77%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/41770340-4bfb-4dd7-99b7-6b00b07dd28c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
