I have a method annotated with @Provides in my Guice config, but it doesn't work.
public class GuiceConfig extends GuiceServletContextListener {
...
@Provides @RequestScoped
EntityManager provideEntityManger() {
return entityManagerFactory.createEntityManager();
}
}
When I run my application I get the following error:
com.google.inject.CreationException: Guice creation errors:<|<|1) No implementation for javax.persistence.EntityManager was bound.<| while locating javax.persistence.EntityManager<|
for parameter 0 at com.someclass.of.myproject