Description
William Ashley opened SPR-6093 and commented
I currently run a patched M4 build to work around problems with @ExceptionHandler
methods (and @ResponseStatus
on them) not functioning with overridden methods (in my case it's due to @Transactional
CGlib proxies). While patching these issues, I also changed handling of some other annotations which were being queried using Method.getAnnotation/Method.isAnnotationPresent as opposed to AnnotationUtils.findAnnotation.
I have attached my patch as a starting point. I believe I found all instances where AnnotationUtils.findAnnotation was not being used and fixed them. However, I only updated the tests for AnnotationMethodHandlerExceptionResolver. I did not feel confident with the amount of time I had to update the tests for AnnotationMethodHandlerAdapter.
I think these changes are in line with a recent checkin (revision 1852) related to inheritance of JMX annotations (#8316 #9714 and #10483).
Affects: 3.0 M4
Attachments:
- mvc-annotation-inheritance.patch (7.99 kB)
Issue Links:
- @ExceptionHandler on CGLib-proxied controller is ineffectual [SPR-5959] #10627
@ExceptionHandler
on CGLib-proxied controller is ineffectual ("is duplicated by") - @Controller marked class cannot implements Comparator [SPR-5935] #10604
@Controller
marked class cannot implements Comparator
Referenced from: commits 04fa5d4
1 votes, 1 watchers