Skip to content

Add QueryRewriter bean support to AOT repositories#4264

Open
yeomin4242 wants to merge 1 commit into
spring-projects:mainfrom
yeomin4242:feat/aot-query-rewriter-beans
Open

Add QueryRewriter bean support to AOT repositories#4264
yeomin4242 wants to merge 1 commit into
spring-projects:mainfrom
yeomin4242:feat/aot-query-rewriter-beans

Conversation

@yeomin4242

Copy link
Copy Markdown

This PR adds BeanFactory-backed QueryRewriter resolution for AOT-generated JPA repository fragments.

AOT repositories now obtain QueryRewriter instances from the application context when a bean is available and fall back to no-args instantiation otherwise. This keeps the existing generated-fragment behavior while allowing QueryRewriter implementations that need bean dependencies.

Closes #3839
Closes #3984

  • You have read the Spring Data contribution guidelines.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

Signed-off-by: YeongJae Min <whereismysejong@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 1, 2026
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.

Add AOT Bean support for QueryRewriter beans Add BeanFactoryQueryRewriterProvider for AOT repository fragment instantiation

2 participants