spring-projects / spring-projects/spring-boot
Simplify JPA DDL properties and auto-configuration
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 81.5k
- Forks
- 42.7k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 65
Description
In Spring Boot 2, having thespring.jpa.generate-ddl property set to true did not perform any updates as long as the corresponding hibernate properties (hibernate.hbm2ddl.auto) were not explicitly set. When updating to Spring Boot 3, the same does not apply; the schema update does take place and the Hibernate sql statement is printed to the logs (show-sql=true). Here's a git repo where the issue can be demonstrated. Steps to duplicate are in the README.
Hibernate Java Docs also indicate that if no value is provided, the default for hibernate.hbm2ddl.auto is none
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the README in the linked reproduction repository and verify the differing Spring Boot 2 and 3 behavior for spring.jpa.generate-ddl, hibernate.hbm2ddl.auto, and show-sql. Trace the JPA auto-configuration entry points and compare the result with Hibernate's documented default; done means the properties behave consistently without an explicitly set Hibernate schema mode.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100