Skip to content

AOT repository fragment generation fails with a custom QueryEnhancerSelector #4382

Closed

Description

@ryujungkyun

Configuring a custom QueryEnhancerSelector through @EnableJpaRepositories causes AOT repository fragment generation to fail.

Steps to reproduce

  1. Implement a custom QueryEnhancerSelector that delegates to QueryEnhancerSelector.DEFAULT_SELECTOR.

  2. Configure it using @EnableJpaRepositories(queryEnhancerSelector = CustomQueryEnhancerSelector.class).

  3. Generate the repository's AOT fragment.

Expected behavior

AOT repository fragment generation succeeds with the configured selector.

Actual behavior

Generation fails with:

Image

The exception originates from JpaRepositoryContributor.customizeConstructor(), which uses T$ instead of the JavaPoet type placeholder $T:

Image

Verification

Reproduced on 4.2.0-SNAPSHOT at commit effece1 with a regression test in JpaRepositoryContributorConfigurationTests. Replacing T$ with $T allows the test to generate, compile, and instantiate the AOT fragment successfully.

Activity

  1. self-assigned this
    on Oct 12, 2026
  2. added
    type: bug
    and removed
    status: waiting-for-triage
    on Oct 12, 2026
  3. added 2 commits that reference this issue on Oct 13, 2026
    fe88176
    b58f438
  4. added this to the 4.0.8 (2025.1.8) milestone on Oct 13, 2026
  5. added a commit that references this issue on Oct 14, 2026
    96b0c41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

type: bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions