Starting from scratch without any previous Jersey 1.x knowledge, I\'m having a hard time understanding how to setup dependency injection in my Jersey 2.0 project.
Late but I hope this helps someone.
I have my JAX RS defined like this:
@Path("/examplepath")
@RequestScoped //this make the diference
public class ExampleResource {
Then, in my code finally I can inject:
@Inject
SomeManagedBean bean;
In my case, the SomeManagedBean
is an ApplicationScoped bean.
Hope this helps to anyone.