我在 MacBook 上启动测试 Vaadin 网站时遇到问题。当我尝试在 Safari 中打开端口 8080 时,它会打开我的一个旧 Vaadin 项目。 IntelliJ 一直告诉我这一点。
[INFO] Started o.e.j.m.p.JettyWebAppContext@162c1dfb{/,file:///Users/jackson/proghub/assignment5/src/main/webapp/,AVAILABLE}{file:///Users/jackson/proghub/assignment5/src/main/webapp/}
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.285 s
[INFO] Finished at: 2017-04-13T12:22:16-05:00
[INFO] Final Memory: 46M/381M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.9.v20160517:run (default-cli) on project assignment5: Failure: Address already in use -> [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
Process finished with exit code 1
显然问题是:
Failure: Address already in use
我该怎么办?
最佳答案
选择不同的端口。
端口 8080 正在被其他进程使用。
也许您可以更改测试以使用端口 0(系统分配的动态端口)。等待服务器启动,找出其端口号,然后在测试中使用它。
关于java - 无法启动本地 Vaadin 测试站点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43398318/