Skip to content

Preserve property source precedence when collecting JPA properties. - #4384

Open
zemiles wants to merge 2 commits into
spring-projects:mainfrom
zemiles:main
Open

zemiles wants to merge 2 commits into
spring-projects:mainfrom
zemiles:main

Conversation

@zemiles

@zemiles zemiles commented Oct 9, 2026 •

Copy link
Copy Markdown

Fixes #4379.

AOT repository processing currently allows lower-priority property sources to overwrite higher-priority spring.jpa.properties.* values.

Collect these properties using first-value-wins semantics, then merge them into the JPA properties. This preserves explicit JPA property overrides for the well-known naming strategies.

Add two regression tests covering property source precedence and naming strategy overrides. The precedence test fails before the fix.

Validation:

  • Full Maven build passed on JDK 17 and JDK 25.
  • Full Maven build with the Hibernate 8 profile passed on JDK 25.
  • MySQL and PostgreSQL integration tests passed in all three combinations.
  • All 14 Oracle integration tests passed on JDK 17 using gvenzl/oracle-free:23.26.2-slim-faststart.

Checklist:

Keep values from higher-priority property sources while preserving
explicit JPA property overrides for naming strategies.
Add regression tests for both behaviors.

Fixes spring-projects#4379.

Signed-off-by: 안승현 <abeb3@naver.com>
Signed-off-by: 안승현 <abeb3@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 9, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AOT repository processing applies spring.jpa.properties with inverted precedence

2 participants