首页 新闻 会员 周边 捐助

maven搭建的SpringMvc项目tomcat一直卡在下面启动的状态

0
悬赏园豆:20 [已解决问题] 解决于 2018-06-22 13:10

F:\java_zhuomao\tomcat\apache-tomcat-8.5.31\bin\catalina.bat run
[2018-06-22 09:53:10,970] Artifact testTime:war exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE: "C:\Users\woshishabi\.IntelliJIdea2018.1\system\tomcat\Unnamed_testTime"
Using CATALINA_HOME: "F:\java_zhuomao\tomcat\apache-tomcat-8.5.31"
Using CATALINA_TMPDIR: "F:\java_zhuomao\tomcat\apache-tomcat-8.5.31\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_171"
Using CLASSPATH: "F:\java_zhuomao\tomcat\apache-tomcat-8.5.31\bin\bootstrap.jar;F:\java_zhuomao\tomcat\apache-tomcat-8.5.31\bin\tomcat-juli.jar"
22-Jun-2018 09:53:12.221 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.31
22-Jun-2018 09:53:12.224 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Apr 27 2018 20:24:25 UTC
22-Jun-2018 09:53:12.224 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.31.0
22-Jun-2018 09:53:12.224 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
22-Jun-2018 09:53:12.224 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 6.1
22-Jun-2018 09:53:12.224 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
22-Jun-2018 09:53:12.224 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_171\jre
22-Jun-2018 09:53:12.225 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_171-b11
22-Jun-2018 09:53:12.225 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
22-Jun-2018 09:53:12.225 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\woshishabi\.IntelliJIdea2018.1\system\tomcat\Unnamed_testTime
22-Jun-2018 09:53:12.226 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: F:\java_zhuomao\tomcat\apache-tomcat-8.5.31
22-Jun-2018 09:53:12.226 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\woshishabi\.IntelliJIdea2018.1\system\tomcat\Unnamed_testTime\conf\logging.properties
22-Jun-2018 09:53:12.227 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
22-Jun-2018 09:53:12.227 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
22-Jun-2018 09:53:12.227 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
22-Jun-2018 09:53:12.237 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
22-Jun-2018 09:53:12.238 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
22-Jun-2018 09:53:12.239 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
22-Jun-2018 09:53:12.239 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
22-Jun-2018 09:53:12.239 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
22-Jun-2018 09:53:12.239 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
22-Jun-2018 09:53:12.240 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\woshishabi\.IntelliJIdea2018.1\system\tomcat\Unnamed_testTime
22-Jun-2018 09:53:12.243 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=F:\java_zhuomao\tomcat\apache-tomcat-8.5.31
22-Jun-2018 09:53:12.243 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=F:\java_zhuomao\tomcat\apache-tomcat-8.5.31\temp
22-Jun-2018 09:53:12.243 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.16] using APR version [1.6.3].
22-Jun-2018 09:53:12.243 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
22-Jun-2018 09:53:12.244 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
22-Jun-2018 09:53:13.303 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2m 2 Nov 2017]
22-Jun-2018 09:53:13.467 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
22-Jun-2018 09:53:13.483 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
22-Jun-2018 09:53:13.490 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
22-Jun-2018 09:53:13.493 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
22-Jun-2018 09:53:13.494 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1736 ms
22-Jun-2018 09:53:13.528 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
22-Jun-2018 09:53:13.528 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.31
22-Jun-2018 09:53:13.556 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
22-Jun-2018 09:53:13.568 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
22-Jun-2018 09:53:13.571 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 77 ms
Connected to server
[2018-06-22 09:53:13,695] Artifact testTime:war exploded: Artifact is being deployed, please wait...
22-Jun-2018 09:53:15.732 信息 [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.
[2018-06-22 09:53:16,097] Artifact testTime:war exploded: Artifact is deployed successfully
[2018-06-22 09:53:16,098] Artifact testTime:war exploded: Deploy took 2,403 milliseconds
22-Jun-2018 09:53:23.556 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [F:\java_zhuomao\tomcat\apache-tomcat-8.5.31\webapps\manager]
22-Jun-2018 09:53:23.637 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [F:\java_zhuomao\tomcat\apache-tomcat-8.5.31\webapps\manager] has finished in [80] ms
22-Jun-2018 09:53:36.053 信息 [http-nio-8080-exec-5] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'springmvc': initialization started
22-Jun-2018 09:53:36.100 信息 [http-nio-8080-exec-5] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace 'springmvc-servlet': startup date [Fri Jun 22 09:53:36 CST 2018]; root of context hierarchy
22-Jun-2018 09:53:36.178 信息 [http-nio-8080-exec-5] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [springMvc.xml]
22-Jun-2018 09:53:37.282 信息 [http-nio-8080-exec-5] org.springframework.web.servlet.handler.SimpleUrlHandlerMapping.registerHandler Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
22-Jun-2018 09:53:37.417 信息 [http-nio-8080-exec-5] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/testhello]}" onto public org.springframework.web.servlet.ModelAndView com.lj.TimeController.user_testRest(int) throws java.lang.Exception
22-Jun-2018 09:53:37.550 信息 [http-nio-8080-exec-5] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'springmvc-servlet': startup date [Fri Jun 22 09:53:36 CST 2018]; root of context hierarchy
22-Jun-2018 09:53:37.654 信息 [http-nio-8080-exec-5] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'springmvc-servlet': startup date [Fri Jun 22 09:53:36 CST 2018]; root of context hierarchy
22-Jun-2018 09:53:37.861 信息 [http-nio-8080-exec-5] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'springmvc': initialization completed in 1807 ms

tomcat就一直运行到这儿,访问localhost:8080 可以访问到,但是访问项目一直404

 

这是pom文件:

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.lj</groupId>
<artifactId>testTime</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>

<name>testTime Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<spring.version>4.3.12.RELEASE</spring.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.3</version>
</dependency>
</dependencies>

<build>
<finalName>testTime</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>



这是springMvc配置文件
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
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/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
">

<context:component-scan base-package="com.lj"/>
<mvc:default-servlet-handler/>
<mvc:annotation-driven/>

<!-- 视图解析器-->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!-- 配置路径的前缀 -->
<property name="prefix" value="/WEB-INF/jsp/"/>
<!-- 配置路径的后缀 -->
<property name="suffix" value=".jsp"/>
</bean>

<!-- 配置 文件上传的支持 -->
<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="maxUploadSize" value="1024000000"/>
<property name="resolveLazily" value="true"/>
<property name="maxInMemorySize" value="4096"/>
<property name="defaultEncoding" value="UTF-8"/>
</bean>
</beans>

 

派小星的主页 派小星 | 初学一级 | 园豆:114
提问于:2018-06-22 10:01
< >
分享
最佳答案
0

看不出来错误,

你参考下这个吧,对照一下

spring+springMVC+mybaits整合SSM框架~Simple-SSM

收获园豆:20
不会摇头的风扇 | 菜鸟二级 |园豆:443 | 2018-06-22 10:16

很感谢你的回答,但不是我这边的问题,我访问不到项目以为是tomcat卡主了,其实是idea的访问路径需要设置。

派小星 | 园豆:114 (初学一级) | 2018-06-22 13:09
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册