I have several controllers in a spring mvc application. They are regular beans that inherit from MultiActionController
. They also have a custom MethodNameResolver
that inspects a certain request parameter.
Now I am trying to use a new controller - a pojo with @Controller
annotation. I am using @RequestMapping
to resolve methods.
I am not sure if I understand this correctly, but as explained here in the spring reference, it is possible to use @RequestMapping
with various filters (e.g. GET vs POST) without specifying a path, and then if a url applies to several methods then Spring falls back to InternalPathMethodNameResolver
to decide which method to invoke.
How can I tell Spring to fall back to my custom MethodNameResolver
? Is it enough to inject the resolver to my pojo controller?
(my controller doesn't inherit from any Spring specific class)