You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While implementing a fix for the regression raised in #23985, it became apparent that methods in a @ControllerAdvice bean end up being registered and invoked twice if the advice is a scoped bean (e.g., request or session scoped). In other words, both the proxy bean and the target bean are wrapped in ControllerAdviceBean instances.
The reason this happens is that ControllerAdviceBean.findAnnotatedBeans() finds all beans in the ApplicationContext that are annotated with @ControllerAdvice.
Deliverables
Ensure that the list returned by ControllerAdviceBean.findAnnotatedBeans() does not contain target beans for scoped proxies.