spring-projects / spring-projects/spring-tools

[modulith support] improve handling of Spring Modulith metadata creation and caching

Open
#1,858 0 comments 0 reactions 2 assignees View on GitHub

@BoykoAlex is already working on this.

Since Mar 25, 2026.

for: eclipse for: vscode theme: internal-architecture theme: performance theme: spring index & symbols theme: validation type: enhancement
Dominant language
Java
Stars
983
Forks
240
Avg merge
7d 1h
Merged PRs (30d)
7

Description

At the moment, we kick-off a separate process to let Spring Modulith produce the metadata information from the running application on demand. We keep this information in memory for some time and have a manual action to trigger a re-creation of this modulith metadata information.

One approach to improve this would be:

  • once we produce the JSON based metadata information, we store this in a cache for the project (on disc, similar to the index cache).
  • instead of re-creating this metadata information at startup, we read this from the cache
  • as a key for the cache, we create a hash value from:
    • the types from the source codes (we can use the existing stereotype index elements for this, I think)
    • a set of specific annotations on those types (those from Spring Modulith)
    • as hash of the classpath of the project

That way, we can check whether the cache needs to be invalidated or not by computing the hash from the up-to-date index and classpath information and compare that to the data in the cache (on disc, for example).

In addition to that, we keep the action to manually trigger an update of this metadata.

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.