Do you create a new injector (or childinjector) for every request?
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 google-guice...@googlegroups.com.
To post to this group, send email to google...@googlegroups.com.
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.
For more options, visit https://groups.google.com/d/optout.
child injector per request