启动项目遇到以下问题:
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
Process finished with exit code 1

找到要启动的项目的配置文件application.properties
,没有的话可以在 resources
下手动创建。如图添加端口号设置代码,改一个不重复的端口号,启动项目即可成功。此处要注意的是,Spring Boot 可以用不同类型的配置文件,其语法也不相同,详情请参考【Spring Boot】Spring Boot 配置文件详解(application.yml、application-dev.yml、application-test.yml )。
yaml
# 应用服务 WEB 访问端口
server.port=8081

最后运行成功!
持续更新ing,动动小手,点点关注,后续更精彩!