搭建框架学习springmvc,用非注解的方式,handdlermapping用的是SimpleUrlHandlerMapping,需要怎么配置handdleradapter
<?xml version="1.0" encoding="UTF-8"?>
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/main.html">userController</prop>
</props>
</property>
</bean>
<bean id="userController" class="com.walle.user.controller.UserController">
</bean>
<!-- 开启注解 -->
<!-- <mvc:annotation-driven></mvc:annotation-driven> -->
<!-- 扫描包中的注解,注册成bean -->
<!-- <context:component-scan base-package="com.walle"></context:component-scan> -->
<!-- 静态资源 -->
<mvc:resources location="/resources/static/" mapping="/resources/**"></mvc:resources>
<!-- 配置视图解析器 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/pages"></property>
<property name="suffix" value=".jsp"></property>
</bean>
现在访问localhost:8080/learn_sia/main.html会报错
Servlet.service() for servlet [dispatcher] in context with path [/learn_sia] threw exception [No adapter for handler [com.walle.user.controller.UserController@55d8d551]: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler] with root cause
javax.servlet.ServletException: No adapter for handler [com.walle.user.controller.UserController@55d8d551]: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler