Jersey (2) uses HK2 as its dependency injection (DI) system. We can use other injection systems, but its infrastructure is built with HK2, and allows us to also use it within our applications.
Setting up simple dependency injection with Jersey takes just a few lines of code. Let say for example we ...