The SVN version of Guice supports JSR-330 annotations ("JSR-330 Integration - This documents an experimental, unreleased feature available in Guice SVN only"). Google gives the advise: "For now, stick with Guice's annotations and Provider interface." Guice 2 is a year old now and I wonder if there will be JSR-330 support in the near future. Does anyone know?
If you're comfortable using code from SVN, use that and the JSR-330 annotations. If you'd rather rely on a published release, use Guice's own annotations. Also, JSR-330 doesn't support optional injection.
Note that there's a tiny behaviour change with Guice post-2.0 to cope with the new @Inject annotation.
@Inject are injected, if they override a method that does have that annotation.We don't have a release date scheduled for Guice 2.1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With