运行tomcat出现404?

运行tomcat出现404?

部署完项目,输入路径localhost:8080/department/list转到如下页面,请问是什么问题呢?

http://img1.sycdn.imooc.com//climg/5c90c0db0001ad7511600355.jpgtomcat控制台的代码:

D:\apache-tomcat-8.5.35\bin\catalina.bat run
[2019-03-19 06:18:25,009] Artifact oa_web:war: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE:   "C:\Users\admin\.IntelliJIdea2018.3\system\tomcat\_oa"
Using CATALINA_HOME:   "D:\apache-tomcat-8.5.35"
Using CATALINA_TMPDIR: "D:\apache-tomcat-8.5.35\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_144"
Using CLASSPATH:       "D:\apache-tomcat-8.5.35\bin\bootstrap.jar;D:\apache-tomcat-8.5.35\bin\tomcat-juli.jar"
19-Mar-2019 18:18:25.633 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.35
19-Mar-2019 18:18:25.635 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Nov 3 2018 17:39:20 UTC
19-Mar-2019 18:18:25.635 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.35.0
19-Mar-2019 18:18:25.635 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7
19-Mar-2019 18:18:25.635 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.1
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk1.8.0_144\jre
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_144-b01
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\admin\.IntelliJIdea2018.3\system\tomcat\_oa
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         D:\apache-tomcat-8.5.35
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\admin\.IntelliJIdea2018.3\system\tomcat\_oa\conf\logging.properties
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
19-Mar-2019 18:18:25.636 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
19-Mar-2019 18:18:25.637 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
19-Mar-2019 18:18:25.637 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
19-Mar-2019 18:18:25.637 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\admin\.IntelliJIdea2018.3\system\tomcat\_oa
19-Mar-2019 18:18:25.637 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\apache-tomcat-8.5.35
19-Mar-2019 18:18:25.637 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-8.5.35\temp
19-Mar-2019 18:18:25.637 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.18] using APR version [1.6.5].
19-Mar-2019 18:18:25.637 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
19-Mar-2019 18:18:25.637 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
19-Mar-2019 18:18:25.642 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1  11 Sep 2018]
19-Mar-2019 18:18:25.724 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
19-Mar-2019 18:18:25.738 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Mar-2019 18:18:25.762 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
19-Mar-2019 18:18:25.764 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Mar-2019 18:18:25.765 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 348 ms
19-Mar-2019 18:18:25.787 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
19-Mar-2019 18:18:25.787 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.35
19-Mar-2019 18:18:25.796 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
19-Mar-2019 18:18:25.805 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
19-Mar-2019 18:18:25.808 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 42 ms
Connected to server
[2019-03-19 06:18:26,074] Artifact oa_web:war: Artifact is being deployed, please wait...
19-Mar-2019 18:18:27.213 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
19-Mar-2019 18:18:27.340 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'SpringMVC': initialization started
19-Mar-2019 18:18:27.355 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace 'SpringMVC-servlet': startup date [Tue Mar 19 18:18:27 CST 2019]; root of context hierarchy
19-Mar-2019 18:18:27.385 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [spring-web.xml]
19-Mar-2019 18:18:27.529 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [spring-biz.xml]
19-Mar-2019 18:18:27.550 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [spring-dao.xml]
19-Mar-2019 18:18:27.836 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName Loaded JDBC driver: com.mysql.jdbc.Driver
19-Mar-2019 18:18:28.326 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/add],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.add(javax.servlet.http.HttpSession,com.rongrong.oa.dto.ClaimVoucherInfo)
19-Mar-2019 18:18:28.327 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/update],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.update(javax.servlet.http.HttpSession,com.rongrong.oa.dto.ClaimVoucherInfo)
19-Mar-2019 18:18:28.327 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/check],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.check(javax.servlet.http.HttpSession,com.rongrong.oa.entity.DealRecord)
19-Mar-2019 18:18:28.327 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/submit],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.submit(int)
19-Mar-2019 18:18:28.327 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/detail],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.detail(int,java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.328 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/deal],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.deal(javax.servlet.http.HttpSession,java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.328 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/to_check],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.toCheck(int,java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.328 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/self],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.self(javax.servlet.http.HttpSession,java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.329 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/to_update],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.toUpdate(int,java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.329 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/claim_voucher/to_add],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.ClaimVoucherController.toAdd(java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.332 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/department/add],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.DepartmentController.add(com.rongrong.oa.entity.Department)
19-Mar-2019 18:18:28.333 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/department/remove],methods=[],params=[sn],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.DepartmentController.remove(java.lang.String)
19-Mar-2019 18:18:28.333 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/department/update],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.DepartmentController.update(com.rongrong.oa.entity.Department)
19-Mar-2019 18:18:28.333 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/department/list],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.DepartmentController.list(java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.334 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/department/to_update],methods=[],params=[sn],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.DepartmentController.toUpdate(java.lang.String,java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.334 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/department/to_add],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.DepartmentController.toAdd(java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.335 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/employee/add],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.EmployeeController.add(com.rongrong.oa.entity.Employee)
19-Mar-2019 18:18:28.335 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/employee/remove],methods=[],params=[sn],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.EmployeeController.remove(java.lang.String)
19-Mar-2019 18:18:28.335 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/employee/update],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.EmployeeController.update(com.rongrong.oa.entity.Employee)
19-Mar-2019 18:18:28.335 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/employee/list],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.EmployeeController.list(java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.336 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/employee/to_update],methods=[],params=[sn],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.EmployeeController.toUpdate(java.lang.String,java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.336 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/employee/to_add],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.EmployeeController.toAdd(java.util.Map<java.lang.String, java.lang.Object>)
19-Mar-2019 18:18:28.337 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/login],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.GlobalController.login(javax.servlet.http.HttpSession,java.lang.String,java.lang.String)
19-Mar-2019 18:18:28.337 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/change_password],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.GlobalController.changePassword(javax.servlet.http.HttpSession,java.lang.String,java.lang.String,java.lang.String)
19-Mar-2019 18:18:28.337 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/self],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.GlobalController.self()
19-Mar-2019 18:18:28.337 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/to_login],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.GlobalController.toLogin()
19-Mar-2019 18:18:28.338 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/quit],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.GlobalController.quit(javax.servlet.http.HttpSession)
19-Mar-2019 18:18:28.338 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.registerHandlerMethod Mapped "{[/to_change_password],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.rongrong.oa.controller.GlobalController.toChangePassword()
19-Mar-2019 18:18:28.500 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
19-Mar-2019 18:18:28.532 信息 [RMI TCP Connection(3)-127.0.0.1] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'SpringMVC': initialization completed in 1192 ms
[2019-03-19 06:18:28,551] Artifact oa_web:war: Artifact is deployed successfully
[2019-03-19 06:18:28,551] Artifact oa_web:war: Deploy took 2,477 milliseconds
19-Mar-2019 18:18:35.799 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\apache-tomcat-8.5.35\webapps\manager]
19-Mar-2019 18:18:35.898 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\apache-tomcat-8.5.35\webapps\manager] has finished in [100] ms

spring-biz.xml:

<beans  xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx.xsd">

    <import resource="spring-dao.xml"/>

    <context:component-scan base-package="com.rongrong.oa.biz"/>
    <aop:aspectj-autoproxy/>

    <bean id="transationManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource"/>
    </bean>

    <tx:advice id="txAdvice" transaction-manager="transationManager">
        <tx:attributes>
            <tx:method name="get*" read-only="true"/>
            <tx:method name="find*" read-only="true"/>
            <tx:method name="search*" read-only="true"/>
            <tx:method name="*" propagation="REQUIRED"/>
        </tx:attributes>
    </tx:advice>

    <aop:config>
        <aop:pointcut id="txpc" expression="execution(* com.rongrong.oa.biz.*.*(..))"/>
        <aop:advisor advice-ref="txAdvice" pointcut-ref="txpc"/>
    </aop:config>

</beans>

spring-dao.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

    <context:component-scan base-package="com.rongrong.oa.dao"/>

    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
        <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://localhost:3306/oa?useUnicode=true&amp;characterEncoding=utf-8"/>
        <property name="username" value="root"/>
        <property name="password" value="rongrong2019"/>
    </bean>

    <bean id="sessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="typeAliasesPackage" value="com.rongrong.oa.entity"/>
    </bean>

    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="sqlSessionFactoryBeanName" value="sessionFactory"/>
        <property name="basePackage" value="com.rongrong.oa.dao"/>
    </bean>
</beans>

spring-web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd
    http://www.springframework.org/schema/aop
    http://www.springframework.org/schema/aop/spring-aop.xsd
    http://www.springframework.org/schema/tx
    http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">

    <import resource="spring-biz.xml"/>

    <context:component-scan base-package="com.rongrong.oa.controller"/>
    <mvc:annotation-driven/>

    <mvc:default-servlet-handler/>

    <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
        <property name="prefix" value="/WEB-INF/pages"/>
        <property name="suffix" value=".jsp"/>
    </bean>

    <mvc:interceptors>
        <mvc:interceptor>
            <mvc:mapping path="/**"/>
            <bean class="com.rongrong.oa.global.LoginInterceptor"/>
            <!--bean class="LoginIn"-->
        </mvc:interceptor>
    </mvc:interceptors>
</beans>


正在回答

登陆购买课程后可参与讨论,去登陆

3回答

建议同学在下图位置添加一下/试试,祝学习愉快~

http://img1.sycdn.imooc.com//climg/5c91d5fb00014beb09720166.jpg

chrismorgen 2019-03-20 13:49:49

你好同学, 你tomcat的运行信息是正常的,没有出现报错,建议粘贴一下项目的展开目录结构的截图,并把转发到jsp页面那个类的代码粘贴一下,祝学习愉快~

http://img1.sycdn.imooc.com//climg/5c91d3e20001ead705120312.jpg

chrismorgen 2019-03-19 19:09:30

你好同学,建议你在路径的department前加上项目名试试,祝学习愉快~

  • 提问者 慕仙哈哈哈 #1
    还是一样的结果。只跳转到/to_login,没法访问,出现404。
    2019-03-19 21:25:33
问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
SSM主流框架入门与综合项目实战2018版
  • 参与学习           人
  • 提交作业       205    份
  • 解答问题       4317    个

Java中非常实用的SSM整合开发内容,从Spring开始,到MyBaits的进阶内容,再到SpringMVC的应用,最后是SSM整合开发案例,逐步深入,助你成长为一名Java工程师!

了解课程
请稍等 ...
意见反馈 帮助中心 APP下载
官方微信

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师