tulsidas / Jersey2-Guice3-JPA2

Sample app showcaseing Jersey 2, Guice 3, JPA 2 and Jackson 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Jersey2-Guice3-JPA2

Sample app showcasing Jersey 2, Guice 3, JPA 2 and Jackson 2

Guice needs an HK2 (which is the DI of Jersey) bridge to work, and also to be able to @Inject EntityManager there is some initialization to make.

Take a look at:

to see how everything integrates together.

Note: You can't @Inject an EntityManager in a Jersey Controller, because controllers are managed by Jersey and not by Guice, hence it won't have te appropriate interceptors

About

Sample app showcaseing Jersey 2, Guice 3, JPA 2 and Jackson 2

License:MIT License


Languages

Language:Java 100.0%