spring-boot - spring-boot:在 ctrl-c 后运行失败
问题描述
我正在尝试运行一个 spring-boot 应用程序。但是,以我当前的设置,我不断收到错误。
- 爪哇 8
- Maven 3.6.1
- 检查环境变量
从 spring-boot 的新版本 2.2.1 开始,我在关闭内置 tomcat 时不断收到相同的错误。
我有一个示例 Spring-Boot 应用程序,我似乎无法正常运行。从 spring initializr 中获取了一个干净的版本。
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.547 s
[INFO] Finished at: 2019-11-07T22:28:54+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.2.1.RELEASE:run (default-cli) on project java13-app: Application finished with exit code: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
当我回到 Spring 2.1.10 时,我得到以下输出:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.1.10.RELEASE)
2019-11-07 22:38:33.194 INFO 2572 --- [ main] test.Application : Starting Application on DP-BTO-Tom with PID 2572 (Y:\tbrx\java-13-spring-boot\target\classes started by Tom in Y:\tbrx\java-13-spring-boot)
2019-11-07 22:38:33.196 INFO 2572 --- [ main] test.Application : No active profile set, falling back to default profiles: default
2019-11-07 22:38:33.966 INFO 2572 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2019-11-07 22:38:33.986 INFO 2572 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-11-07 22:38:33.986 INFO 2572 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.27]
2019-11-07 22:38:34.053 INFO 2572 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-11-07 22:38:34.054 INFO 2572 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 832 ms
2019-11-07 22:38:34.221 INFO 2572 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2019-11-07 22:38:34.361 INFO 2572 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''
2019-11-07 22:38:34.364 INFO 2572 --- [ main] test.Application : Started Application in 1.542 seconds (JVM running for 4.547)
2019-11-07 22:38:35.652 INFO 2572 --- [ Thread-5] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
[Terminate batch job (Y/N)? y
而不是构建失败。
解决方案
作为 Spring Boot - 2.2.1 中的错误询问、修复和关闭
https://github.com/spring-projects/spring-boot/issues/18936#event-2782909196
推荐阅读
- android - 使用 Facebook 重新授权时所需的数据
- javascript - 间歇性引用错误:$ 未定义
- ionic-framework - Ionic AudioToggle 插件如何使用?
- terraform - Terraform“无法计算'count'的值:为什么?
- python - 如何从列表中输出元素以及它们在文档中出现的次数?
- spring-integration - Spring集成Java DSL:如何在一个集成流运行中共享标头变量
- python - 您传递给模型的 Numpy 数组列表不是模型预期的大小。预计会看到 2 个数组
- javascript - 使用 FB.ui 在 facebook 上分享重定向到 facebook 游戏?
- ios - Swift UITest在tableviewcell中找不到collectionview
- ios - 如何从本地领域数据库恢复数据?