Most Spring Boot developers would struggle to answer the question: which Hibernate bootstrap path are you actually using? The answer is “the one Spring Boot chose for you”, which is the EntityManagerFactory path, built by HibernateJpaAutoConfiguration, wired to a HikariDataSource, reading from application.properties. You have never typed a single line of Hibernate bootstrap code.
That is fine for the common case. But when something breaks at startup — the wrong dialect is selected, HikariCP sizing is wrong, the schema validation fails — you need to know what is actually being configured and where. And for projects outside Spring Boot (command-line tools, framework libraries, Jakarta EE deployments), you need to choose a bootstrap path and implement it deliberately.
This post covers all three paths, when each makes sense, and the production failure that catches developers who autoconfig their way to production without understanding what they built.
Continue reading Bootstrapping Hibernate 7: SessionFactory vs EntityManagerFactory vs Spring Boot Auto-Config — A Decision Guide
