08-02-2023, 06:22 AM
What is the difference between:
@Autowired
private EntityManager em;
versus:
@PersistenceContext
private EntityManager em;
Both options work in my application, but can I break something by using the `@Autowired` annotation?
@Autowired
private EntityManager em;
versus:
@PersistenceContext
private EntityManager em;
Both options work in my application, but can I break something by using the `@Autowired` annotation?