Why does Spring mvc need HandlerAdapter?

Spring mvc two components: HandlerMapping and HandlerAdapter;
HandlerMapping can already help us match the specific controller (Controller)?
then why do you need HandlerAdapter??


adapter pattern, there are many kinds of controller (Controller), one of which is annotated with @ Controller, and you can also write a servlet as controller, so use the adapter to adapt. Take a look at how many subclasses HandlerAdapter has. Each subclass adapts to a certain type of controller. With HandlerAdapter, you only need to call the handle method, shielding the inconsistent details, otherwise you will have to if else if else

in the DispatcherServlet.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e483b4-44c87.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e483b4-44c87.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?