为了账号安全,请及时绑定邮箱和手机立即绑定

在登录页面点击登录404 controller 注解也添加了 html路径也没错 找不到问题了,请各位指点

http://img1.sycdn.imooc.com//5d8c13c900012fa112540718.jpghttp://img1.sycdn.imooc.com//5d8c13dc0001bc0a09780627.jpghttp://img1.sycdn.imooc.com//5d8c13f100015f4c12510619.jpg

登录提示404


http://img1.sycdn.imooc.com//5d8c142d0001880709290299.jpg

正在回答

3 回答

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">

    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:spring/spring.xml</param-value>
    </context-param>

    <!--Spring监听器-->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>

    <filter>
        <filter-name>shiroFilter</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>shiroFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    
    <servlet>
        <servlet-name>SpringMVC</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath*:spring/springmvc.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>SpringMVC</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
</web-app>

web.xml


另外,在pom.xml中spring依赖的版本最好换成4.3以上

0 回复 有任何疑惑可以回复我~

只不过是前后调换了一下

0 回复 有任何疑惑可以回复我~

前方高能!!!!!注意注意!!!!老师估计手误 ,,排除静态资源那个地方应该是这样 !!好坑啊  !!!!http://img1.sycdn.imooc.com//5da417e70001146e04820077.jpg

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

在登录页面点击登录404 controller 注解也添加了 html路径也没错 找不到问题了,请各位指点

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信