java - Spring @Controller and custom MethodNameResolver -


I have several controllers in the spring MVC application. They are regular beans that can be used with multi-dimensional controller Receive. They have a custom MethodNameResolver that inspects a specific request parameter.

Now I am trying to use a new controller - with a code @Controller annotation. I am using @RequestMapping to resolve the methods.

I am not sure that I understand it correctly, but as explained in the spring context, it can be used by various filters (for example, vs. POST) without specifying the path Make a request mapping with and then if a URL applies to multiple instances then the Spring has to return to InternalPathMethodNameResolver so that they can decide which method to use.

How can I tell Spring to come back to my custom MethodNameResolver ? Is the resistor injectable with my POSO controller?

I think that is not possible by any spring space class You need to declare the AnnotationMethodHandlerAdapter Bean and set its methodNameResolver property.

Comments