Does spring-boot have a default EntityManager. I am setting one up right now but I noticed when my project loads I see this:
LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
Is this a default EntityManager and if so, how do I access it?
Thank you in advance.
You can use the @PersistenceContext annotation to inject the entity manager into your spring beans:
@PersistenceContext
EntityManager em;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With