It is design decision of Guice not to support this kind of behavior. See http://code.google.com/p/google-guice/issues/detail?id=49.
There is no reason not to bind all properties at start up. You can then fail early if you mistyped the property. Why fail late if you can fail early. You don't have to worry about binding as Strings. Strings gets converted to integer and similar automatically. You can install a custom type converter using #convertToTypes. Cheers Alen On May 4, 6:34 pm, Eric Jain <[email protected]> wrote: > Is it possible to register a handler with Guice that is called when a > @Named dependency is not found? > > I could then look up missing bindings in the application's > configuration file at runtime; otherwise I'd need to pre-bind all > properties as Strings. > > [http://stackoverflow.com/questions/10440756/can-i-lazy-bind-named- > dependencies] -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
