dagger 2 - Is it possible to use dagger2 with jersey the same way it is possible with guice? -


is possible use dagger2 jersey same way possible guice?

is there dagger2 servlet or dagger2 jersey project?

so, short answer no, there not great way while getting of features of jersey in application.

however, there ways partially this. can register resource in application servlet ( see example of here https://github.com/cogman/gluews/blob/master/src/main/java/com/cogman/glue/glueapplication.java )

what lose approach jersey injected magic things @ field level, such @context. can still @ these things adding them method signatures need them, can't @ field level thing.

the other downside approach resources become singletons. not big deal if resources simple objects service requests, big deal if resources storing sort of state on them.


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -