0

DispatcherServlet has 3 default handler adaptors: HttpRequestHandlerAdapter, SimpleControllerHandlerAdapter, and AnnotationMethodHandlerAdapter. In some situation, DispatcherServlet could find two or more handler objects based on handler mappings. For example, the method on the handler object from AnnotationMethodHandlerAdapter and the handler object from SimpleControllerHandlerAdapter. My question is which handler object DispatcherServlet invoke? Can I set priorities of these three? If so, How?
Thank you in advance.

1 Answer 1

1

HandlerAdapters are ordered using a OrderComparator, so you can set the priority via setOrder() method in Ordered interface.

Sign up to request clarification or add additional context in comments.

1 Comment

What a answer buddy..+10 from me

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.