Error starting ApplicationContext. To display the condition evaluation···

启动java后端程序报错:

bash 复制代码
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2026-02-12T09:26:15.311+08:00 ERROR 35234 --- [model] [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

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

这是典型的 Spring Boot 报错:

Port 8080 was already in use

说明 8080 端口已经被别的进程占用了。

你本机已经有一个服务在跑(很可能是你之前启动的项目)。

如果是是 mac,执行:

bash 复制代码
lsof -i :8080

会看到类似:

bash 复制代码
java    12345 yourname   ...  TCP *:8080 (LISTEN)

记住 PID(比如 12345)

然后执行:

bash 复制代码
kill -9 12345

再重新启动项目即可。

相关推荐
鸠摩智首席音效师2 小时前
如何使用 docker exec 在容器中运行命令 ?
运维·docker·容器
似水এ᭄往昔3 小时前
【Linux】自动化构建-make/Makefile
linux·运维·服务器·ubuntu
顶点多余3 小时前
Linux“信号“从硬件到软件详解
linux·运维·服务器
勘察加熊人3 小时前
ai飞卢小说自动化处理工作流获得提问素材
运维·自动化
瀚高PG实验室4 小时前
rpm包安装报错:cannot open Packages index using db5 - Cannot allocate memory (12)
linux·运维·服务器·瀚高数据库
云计算老刘4 小时前
2. DNS 服务器
运维
水星灭绝4 小时前
win11+wsl2+docker
运维·docker·容器
追风少年王大爷丶4 小时前
nginx 配置无域名访问拒绝
运维·服务器·nginx
AI+程序员在路上5 小时前
嵌入式软件技术大全
linux·开发语言·arm开发·单片机
black方块cxy5 小时前
实现一个输入框多个ip以逗号分隔最多20组,且ip不能重复
java·服务器·前端