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

再重新启动项目即可。

相关推荐
l1o3v1e4ding18 小时前
排查linux CentOS7.6的mysql磁盘 I/O 延迟过高问题
linux·运维·mysql
yleihj18 小时前
vCenter计算机SSL证书续期
服务器·网络协议·ssl
航Hang*18 小时前
Windows Server 配置与管理——第12章:配置数字证书服务器
运维·服务器·windows
爱学习的小囧19 小时前
vSphere Supervisor 服务配置指南:自签名容器注册表使用教程
服务器·网络·esxi·虚拟化·vcf
Edward1111111119 小时前
linux创建普通用户
linux·运维·服务器
mzhan01720 小时前
Linux: rcu: 加速宽限期
linux·rcu
Fanfanaas20 小时前
Linux 基础开发工具(二)
linux·运维·服务器·c语言
雾岛听蓝20 小时前
Linux线程基础
linux·开发语言·经验分享
齐落山大勇20 小时前
Linux的文件IO
linux·运维·服务器
七七powerful21 小时前
运维养龙虾--Tmux 终端复用器完全指南:从入门到 AI Agent 远程操控
运维·服务器·人工智能