-
May 9th, 2012, 03:45 PM
#1
How to get a handler method of a request from the AnnotationMethodHandlerAdapter
Hi,
I'm creating a custom annotation to define in methods with a @RequestMapping annotation a list of mixins to be add in the ObjectMapper attribute of the MappingJacksonHttpMessageConverter. I extended MappingJacksonHttpMessageConverter, did a override of readInternal(Class<?> clazz, HttpInputMessage inputMessage) method and now I need to know the method with the @RequestMapping annotation that will handle, to read from it the mixins and add all before MappingJacksonHttpMessageConverter convert json to object.
I studied AnnotationMethodHandlerAdapter and saw that getMethodResolver(handler) and its inner map are both private, so I can't do methodResolver.resolveHandlerMethod(request) in a extended class. Now I was wondering if have a way to get this handler method without doing dirty things like copy and paste code of class AnnotationMethodHandlerAdapter.
I'll appreciate any help, thanks in advance.
Best regards.
-
Jun 13th, 2012, 06:44 PM
#2
I have same issue in spring-webmvc-3.0.5. AnnotationMethodHandlerAdapter not extensible. I need to add custom Annotation to method which need to be intercepted.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules