ExceptionHandlerExceptionResolver advice applicability check may fail against interface-based controller proxy [SPR-16496] #21039
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Vladislav Kisel opened SPR-16496 and commented
o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver uses HandlerMethod#getBeanType during handler lookup. This method may return com.sun.proxy.Proxy when controller impl is a proxy.
Thus ControllerAdvice basePackages/basePackageClasses/assignableTypes are not working correctly, because ControllerAdviceBean#isApplicableToBeanType receives Proxy class as an argument.
Affects: 4.3.14, 5.0.3
Attachments:
Referenced from: pull request #1684
Backported to: 4.3.15
The text was updated successfully, but these errors were encountered: