2008/12/17 <[email protected]>

> Le mercredi 17 décembre 2008 à 15:42 +0000, Ben Smith a écrit :
> > Hey Arnaud,
> >
> > You can create your own Guice module and, in your Overridden configure
> > function, bind your service implementations to the interfaces:
> >
> > this
> > .bind
> > (PersonService.class).to(PersonServiceDb.class).in(Scopes.SINGLETON);
> >
> > Then add your Guice module to the ones referenced by the web.xml
> >
>
> Thanks Ben for the tip. I will try that but I was wondering whether or
> not Guice was able to handle things only through annotations ? But maybe
> this is possible for consumers, not providers.


I'm not sure what you mean. The only 'required' annotation for Guice is on
the ctor, which tells guice to call a non-default ctor. With Guice 2.0 this
changes so that if the class only defines a single ctor it will use that,
and only if there are multiples will an annotation be required.

The other annotations are purely for convenience sake.


>
>
> Regards,
> arnaud
>
>
>
> Ce message et toutes les pièces jointes sont établis à l'attention
> exclusive de leurs destinataires et sont confidentiels. Si vous recevez ce
> message par erreur, merci de le détruire et d'en avertir immédiatement
> l'expéditeur. L'internet ne permettant pas d'assurer l'intégrité de ce
> message, le contenu de ce message ne représente en aucun cas un engagement
> de la part de Leroy Merlin.
>
>

Reply via email to