Hibernate / Hibernate 7 Basics Interview Questions
How does Hibernate 7 work with Spring Boot 4 - what is auto-configured?
In Spring Boot 4, Hibernate 7 is the default JPA provider auto-configured transparently when spring-boot-starter-data-jpa is on the classpath.
<!-- spring-boot-starter-data-jpa includes: - hibernate-core 7.x - spring-data-jpa - HikariCP connection pool - jakarta.persistence-api 3.2 --> # Complete application.yml for Hibernate 7 in Spring Boot 4: spring: datasource: url: jdbc:postgresql://localhost:5432/mydb username: ${DB_USER} password: ${DB_PASSWORD} hikari: maximum-pool-size: 20 jpa: hibernate: ddl-auto: validate show-sql: false open-in-view: false # CRITICAL: disable OSIV in production! properties: hibernate: format_sql: true default_batch_fetch_size: 100 jdbc: batch_size: 50 order_inserts: true order_updates: true logging: level: org.hibernate.SQL: DEBUG org.hibernate.orm.jdbc.bind: TRACE
More Related questions...