spring-projects / spring-projects/spring-framework

Declarative Restclient Interfaces not compatible with AOP in Native Mode since Spring Boot 4.0

Open
#36,001 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
60.2k
Forks
38.8k
Avg merge
5d 2h
Merged PRs (30d)
27

Description

With Spring Boot 3.x, we could wrap Declarative RestClient Interfaces with Aspects / AOP.
This is especially valuable with Resilience4J + Circuitbreaker.

While in Boot 3.x this worked in JVM + Native Mode,
its not working any more in Native Mode in Boot 4.0.

Please see the minmal reproducer attach

ed, where i used my own annotation to avoid a complex setup with resilience4j.

IN JVM Mode this will put out on startup "### inside simple Circuit Breaker Aspect"

And this is not working in AOT / Native mode

Archiv.zip

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.

Research direction

Start with the attached minimal reproducer and compare its JVM startup output with AOT/native mode, focusing on the declarative RestClient interface and aspect invocation. The fix is complete when the aspect runs in native mode as it does in JVM mode, producing the stated circuit-breaker message.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.