【发布时间】:2021-02-20 14:36:33
【问题描述】:
我正在运行基本的 Spring Boot MVC 应用程序,并且在每次应用程序重新启动时,我必须手动关闭端口 8080,否则 Spring Boot 应用程序将无法运行它会出现此错误:
Execution failed for task ':DemoApplication.main()'.
> Process 'command 'C:/Program Files/Java/jdk-11.0.3/bin/java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
应用关闭后,Tomcat不应该立即关闭并释放8080端口吗?
【问题讨论】:
-
你从哪里运行它?一个罐子?一场战争?一些 IDE?
-
我在 IntelliJ 中运行它。我也在用百里香
-
嗯,这很奇怪,在 Intellij 中使用 spring mvc 时从未遇到过这个问题。阅读 Intellij 文档也许...
-
我把端口改成了8081,还是一样。肯定是它的应用程序在这些端口上运行,仅此而已。
-
你在使用 app-maven-plugin 吗?如果是这样,请尝试运行“appengine:run”而不是“appengine:start”。
标签: spring spring-mvc tomcat server