mvn spring-boot:run 無法啟動(dòng)項(xiàng)目
在IDEA中可以正常啟動(dòng)并訪問,但是?mvn spring-boot:run 無法啟動(dòng)項(xiàng)目,maven報(bào)錯(cuò)信息如下:
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.3.RELEASE:run (default-cli) on project luckymoney: An exception occurred while running. null: InvocationTargetException: Connector configured to li
sten on port 8080 failed to start -> [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
2020-06-29
好像是你的端口有問題,看你application.yml(或者application-dev.yml,自己配的哪個(gè)配置文件)配置文件里面的server:的port是不是配的8080.