开发者社区> 问答> 正文

Spring mvc 映射 到 方法,进不了控制器层

2013-2-28 18:16:03 org.apache.catalina.core.StandardWrapperValve invoke
信息: [org.springframework.web.servlet.PageNotFound]No matching handler method found for servlet request: path '/login/login.action', method 'POST', parameters map['securityCode' -> array['1764'], 'identityVerifyFlag' -> array['0'], 'ipAddr' -> array[''], 'gotoUrl' -> array[''], 'macCode' -> array[''], 'password' -> array['admin'], 'user' -> array['admin']]

展开
收起
a123456678 2016-03-17 15:47:23 3404 0
1 条回答
写回答
取消 提交回答
  • <mvc:annotation-driven>
        </mvc:annotation-driven>
        <context:component-scan base-package="com.xx.project"></context:component-scan>
     
        <mvc:resources location="/resources/*" mapping="/resources/**" />
        <mvc:interceptors>
            <mvc:interceptor>
                <mvc:mapping path="/*.do" />
                <bean class="com.xx.project.actions.UserLoginInterceptor">
                </bean>
            </mvc:interceptor>
        </mvc:interceptors>
     
        <bean
            class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
     
            <property name="messageConverters">
                <list>
                    <bean
                        class="org.springframework.http.converter.StringHttpMessageConverter">
                        <property name="supportedMediaTypes">
                            <list>
                                <value>text/html;charset=UTF-8</value>
                            </list>
                        </property>
                    </bean>
                </list>
            </property>
        </bean>
        <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
     
        </bean>
        <!-- 对模型视图名称的解析,即在模型视图名称添加前后缀 -->
        <bean
            class="org.springframework.web.servlet.view.InternalResourceViewResolver"
            p:prefix="/WEB-INF/jsp/" p:suffix=".jsp"
            p:viewClass="org.springframework.web.servlet.view.InternalResourceView" />
     
        <!-- 上传拦截,如最大上传值及最小上传值 -->
        <bean id="multipartResolver"
            class="org.springframework.web.multipart.commons.CommonsMultipartResolver"
            p:defaultEncoding="utf-8">
            <!-- one of the properties available; the maximum file size in bytes -->
            <property name="maxUploadSize" value="2000000" />
        </bean>
     
        <mvc:default-servlet-handler />
    2019-07-17 19:05:33
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Hoxton 新版本介绍 & 未来展望 立即下载
Java Spring Boot开发实战系列课程【第6讲】:Spring Boot 2.0实战MyBatis与优化(Java面试题) 立即下载
Java Spring Boot开发实战系列课程【第7讲】:Spring Boot 2.0安全机制与MVC身份验证实战(Java面试题) 立即下载

相关实验场景

更多