mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
b4e1d48322
Prior to this commit, methods in a @ControllerAdvice bean were registered and invoked twice if the advice was a scoped bean (e.g., request or session scoped). In other words, both the proxy bean and the target bean were wrapped in ControllerAdviceBean instances. This commit fixes this bug by modifying the findAnnotatedBeans() method in ControllerAdviceBean so that it filters out targets of scoped proxies. Closes gh-24017