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

再重新启动项目即可。

相关推荐
zzzzzz3104 小时前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode4 小时前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户03284722207020 小时前
如何搭建本地yum源(上)
运维
A小辣椒2 天前
TShark:Wireshark CLI 功能
linux
A小辣椒2 天前
TShark:基础知识
linux
AlfredZhao2 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci
AlfredZhao3 天前
vi 删除指定范围的行,不用再反复按 dd
linux·vi
用户9718356334663 天前
银河麒麟 KY10 申威(SW64) 安装 nginx-1.16.1-2.p01.ky10.sw_64.rpm 详细步骤
linux
猪脚踏浪3 天前
linux 拷贝文件或目录到指定的位置
linux
大树884 天前
金刚石散热越强,管路越先见顶
大数据·运维·服务器·人工智能·ai