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

再重新启动项目即可。

相关推荐
AlfredZhao2 小时前
用 crontab 给 LLM 使用量装上“监控眼”
linux
疯狂打码的少年2 小时前
【数据库技术】关系模型基本概念(关系/属性/元组/键)
java·服务器·数据库·笔记
刃神太酷啦4 小时前
Linux 系统 MySQL 完整安装配置教程:从卸载 MariaDB 到优化 my.cnf----《Hello MySQL!》(1)
android·linux·c语言·c++·mysql·leetcode·mariadb
赵文宇(温玉)5 小时前
OpenEuler24.03 SP4 系统安装(欧拉/麒麟V10)
linux·openeuler·欧拉
2601_966799046 小时前
酷嗨米J300:一台相机同步推三平台
运维·服务器·负载均衡
AI行业说6 小时前
2026年清洁耗材智能模板机品牌排名:扫地机拖布、美妆粉扑工厂自动化选型指南
运维·自动化
派大鑫wink6 小时前
Dify 工作流搭建操作手册:以信息化运维周报自动生成为例
运维
志栋智能6 小时前
超自动化运维:支持微服务架构的运维模式
运维·架构·自动化
Bamtone20256 小时前
Bamtone班通:TDR阻抗测试仪如何高效助力AI服务器高速信号完整性验证?
服务器·人工智能·阻抗测试·阻抗分析
资深电气设计6 小时前
技术分析:空调机房水泵性能优势与系统适配性研究——水力能效、结构集成与智能运维维度
大数据·运维