SyntaxFix
Write A Post
Hire A Developer
Questions
You can also get an EntityManager using PersistenceContext or Autowired annotation, but be aware that it will not be thread-safe.
@PersistenceContext private EntityManager entityManager;