DataSource and EntityManager Setup in Spring
Spring Data JPA sits on top of JPA (Java Persistence API), which is implemented by Hibernate. The stack has three layers: DataSource (JDBC connection pool), EntityManagerFactory (Hibernate session factory), and EntityManager (the unit-of-work that tracks entities). Spring Boot auto-configures all three from application.properties.