Hello.
I am playing with Jersey and use it without any Web or JavaEE container.
Still, I'd like to use a little bit of dependency injection. Can anyone
advice me what is the simplest way to do that?
Is my understanding correct that Jersey can handle the injection itself
without any additional injection framework? I tried to annotate a field in
my @Path("/") @Singleton class with @Resource annotation, but nothing
happened. No errors. No warnings. No injection.
Please point me in the right direction and I promise to provide a
jersey/samples/dependency-injection sample into your repository when the
injection starts working.
Thanks in advance.
-jst
PS: I found a tutorials to use Guice and Spring, but as I mentioned, I am
looking for as simple solution as possible - e.g. without any framework,
without changes to web.xml, etc.