springboot项目启动不起来,启动就退出问题

x33g5p2x  于9个月前 转载在 Spring  
字(7.5k)|赞(0)|评价(0)|浏览(98)
.   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.5.5) 2021-10-09 10:52:16.668 INFO 14532 --- [ restartedMain] c.e.w.WatchFileDemoApplication : Starting WatchFileDemoApplication using Java 11.0.11 on DESKTOP-BUT9QSG with PID 14532 (D:\kotlintworkspace\watchFileDemo\target\classes started by sunyuhua in D:\kotlintworkspace\watchFileDemo) 2021-10-09 10:52:16.671 INFO 14532 --- [ restartedMain] c.e.w.WatchFileDemoApplication : No active profile set, falling back to default profiles: default 2021-10-09 10:52:16.840 INFO 14532 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2021-10-09 10:52:17.963 INFO 14532 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 2021-10-09 10:52:18.025 INFO 14532 --- [ restartedMain] c.e.w.WatchFileDemoApplication : Started WatchFileDemoApplication in 2.21 seconds (JVM running for 6.313) 与目标 VM 断开连接, 地址为: ''127.0.0.1:59324',传输: '套接字''

进程已结束,退出代码为 0

出现这个问题,添加maven依赖

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

引入jar后再次启动

D:\JavaJDK\jdk-11.0.11\bin\java.exe -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always "-javaagent:D:\Program Files\JetBrains\IntelliJ IDEA 2021.1.2\lib\idea_rt.jar=51003:D:\Program Files\JetBrains\IntelliJ IDEA 2021.1.2\bin" -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath D:\kotlintworkspace\watchFileDemo\target\classes;D:\apache-maven-3.8.1\repository\org\springframework\boot\spring-boot-starter\2.5.5\spring-boot-starter-2.5.5.jar;D:\apache-maven-3.8.1\repository\org\springframework\boot\spring-boot-autoconfigure\2.5.5\spring-boot-autoconfigure-2.5.5.jar;D:\apache-maven-3.8.1\repository\org\springframework\boot\spring-boot-starter-logging\2.5.5\spring-boot-starter-logging-2.5.5.jar;D:\apache-maven-3.8.1\repository\ch\qos\logback\logback-classic\1.2.6\logback-classic-1.2.6.jar;D:\apache-maven-3.8.1\repository\ch\qos\logback\logback-core\1.2.6\logback-core-1.2.6.jar;D:\apache-maven-3.8.1\repository\org\apache\logging\log4j\log4j-to-slf4j\2.14.1\log4j-to-slf4j-2.14.1.jar;D:\apache-maven-3.8.1\repository\org\apache\logging\log4j\log4j-api\2.14.1\log4j-api-2.14.1.jar;D:\apache-maven-3.8.1\repository\org\slf4j\jul-to-slf4j\1.7.32\jul-to-slf4j-1.7.32.jar;D:\apache-maven-3.8.1\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\apache-maven-3.8.1\repository\org\springframework\spring-core\5.3.10\spring-core-5.3.10.jar;D:\apache-maven-3.8.1\repository\org\springframework\spring-jcl\5.3.10\spring-jcl-5.3.10.jar;D:\apache-maven-3.8.1\repository\org\yaml\snakeyaml\1.28\snakeyaml-1.28.jar;D:\apache-maven-3.8.1\repository\org\springframework\boot\spring-boot-starter-web\2.5.5\spring-boot-starter-web-2.5.5.jar;D:\apache-maven-3.8.1\repository\org\springframework\boot\spring-boot-starter-json\2.5.5\spring-boot-starter-json-2.5.5.jar;D:\apache-maven-3.8.1\repository\com\fasterxml\jackson\core\jackson-databind\2.12.5\jackson-databind-2.12.5.jar;D:\apache-maven-3.8.1\repository\com\fasterxml\jackson\core\jackson-annotations\2.12.5\jackson-annotations-2.12.5.jar;D:\apache-maven-3.8.1\repository\com\fasterxml\jackson\core\jackson-core\2.12.5\jackson-core-2.12.5.jar;D:\apache-maven-3.8.1\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.12.5\jackson-datatype-jdk8-2.12.5.jar;D:\apache-maven-3.8.1\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.12.5\jackson-datatype-jsr310-2.12.5.jar;D:\apache-maven-3.8.1\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.12.5\jackson-module-parameter-names-2.12.5.jar;D:\apache-maven-3.8.1\repository\org\springframework\boot\spring-boot-starter-tomcat\2.5.5\spring-boot-starter-tomcat-2.5.5.jar;D:\apache-maven-3.8.1\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.53\tomcat-embed-el-9.0.53.jar;D:\apache-maven-3.8.1\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.53\tomcat-embed-websocket-9.0.53.jar;D:\apache-maven-3.8.1\repository\org\springframework\spring-web\5.3.10\spring-web-5.3.10.jar;D:\apache-maven-3.8.1\repository\org\springframework\spring-beans\5.3.10\spring-beans-5.3.10.jar;D:\apache-maven-3.8.1\repository\org\springframework\spring-webmvc\5.3.10\spring-webmvc-5.3.10.jar;D:\apache-maven-3.8.1\repository\org\springframework\spring-aop\5.3.10\spring-aop-5.3.10.jar;D:\apache-maven-3.8.1\repository\org\springframework\spring-expression\5.3.10\spring-expression-5.3.10.jar;D:\apache-maven-3.8.1\repository\org\springframework\boot\spring-boot-devtools\2.5.5\spring-boot-devtools-2.5.5.jar;D:\apache-maven-3.8.1\repository\org\projectlombok\lombok\1.18.20\lombok-1.18.20.jar;D:\apache-maven-3.8.1\repository\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;D:\apache-maven-3.8.1\repository\org\springframework\boot\spring-boot\2.5.5\spring-boot-2.5.5.jar;D:\apache-maven-3.8.1\repository\org\springframework\spring-context\5.3.10\spring-context-5.3.10.jar;D:\apache-maven-3.8.1\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.50\tomcat-embed-core-9.0.50.jar;D:\apache-maven-3.8.1\repository\org\apache\tomcat\tomcat-annotations-api\9.0.53\tomcat-annotations-api-9.0.53.jar com.example.watchfiledemo.WatchFileDemoApplication

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.5.5) 2021-10-09 10:53:57.572 INFO 19996 --- [ restartedMain] c.e.w.WatchFileDemoApplication : Starting WatchFileDemoApplication using Java 11.0.11 on DESKTOP-BUT9QSG with PID 19996 (D:\kotlintworkspace\watchFileDemo\target\classes started by sunyuhua in D:\kotlintworkspace\watchFileDemo) 2021-10-09 10:53:57.574 INFO 19996 --- [ restartedMain] c.e.w.WatchFileDemoApplication : No active profile set, falling back to default profiles: default 2021-10-09 10:53:57.620 INFO 19996 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2021-10-09 10:53:57.620 INFO 19996 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG' 2021-10-09 10:53:58.275 INFO 19996 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) 2021-10-09 10:53:58.286 INFO 19996 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2021-10-09 10:53:58.287 INFO 19996 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.50] 2021-10-09 10:53:58.362 INFO 19996 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2021-10-09 10:53:58.362 INFO 19996 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 742 ms 2021-10-09 10:53:58.578 INFO 19996 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729 2021-10-09 10:53:58.601 INFO 19996 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2021-10-09 10:53:58.609  INFO 19996 --- [  restartedMain] c.e.w.WatchFileDemoApplication           : Started WatchFileDemoApplication in 1.354 seconds (JVM running for 2.513)

已经能正常的启动了

相关文章

热门文章

更多