spring-projects / spring-projects/spring-tools

[aot repositories] Refresh AOT Metadata for Gradle Spring Boot project

Open
#1,722 0 comments 0 reactions 1 assignee View on GitHub

@BoykoAlex is already working on this.

Since Nov 25, 2025.

theme: spring-data-support type: enhancement
Dominant language
Java
Stars
983
Forks
240
Avg merge
7d 1h
Merged PRs (30d)
7

Description

AOT generated metadata and classes for spring Data repositories is used by the tools to show CodeLense over repositories methods. This data requires to be refreshed. This is working fine for Spring Boot Maven projects. The support for "Refresh AOT Metadata" is lacking for Gradle projects.

  1. VSCode. The vscode-gradle extension has the command "gradle.runBuild". This command needs to support parameterets: gralde build file path string and gradle build command string. Currently this command asks the user to specify these parameters through the input via UI. The complication is to get to the root project from a build file path.
  2. Eclipse command is mostly implemented (org.springframework.tooling.ls.eclipse.commons.commands.ExecuteGradleTaskHandler). It needs to execute Gradle project refresh at the end manually unfortunately. The processAot task execution results in creation of new source folders which only appear after Gradle Sync of the project... Perhaps there is something we could pass to the gradle built command to trigger that (???)

IMPORTANT The general downside for Gradle Spring Boot projects is that event implementing the 2 commands above properly it is not enough to have "Refresh AOT Metadata" to work flawlessly. The Gradle project case requires not only the org.springframework.boot plugin applied but also org.graalvm.buildtools.native. The processAot task is working properly only if both plugins are present. Therefore we need to see how to apply the plugin via the Gradle build command or not show the command if the Graal plugin is not applied.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.