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

再重新启动项目即可。

相关推荐
AAA大运重卡何师傅(专跑国道)2 分钟前
力扣hot100
服务器·前端·数据库
剑神一笑9 分钟前
Linux lsof 命令深度解析:从文件描述符到进程追踪
linux·运维·php
qq36219670512 分钟前
facebook是什么意思?新手从零到精通完全指南
运维·服务器·facebook
勿芮介20 分钟前
【研发工具】Jenkins镜像源配置问题及解决方案
运维·servlet·jenkins
qq_3129201120 分钟前
如何将Nginx响应时间从500ms降至50ms
运维·nginx
andlbds42 分钟前
解决Ubuntu20.04进入系统卡死在厂商Logo界面问题
linux·ubuntu
MIXLLRED1 小时前
解决: Ubuntu 22.04上树莓派4B扩展板ROS2兼容性修复指南
linux·ubuntu·树莓派
zizle_lin1 小时前
CentOS配置yum源
linux·运维·centos
志栋智能1 小时前
超自动化运维:如何降低人为错误?
大数据·运维·网络·人工智能·自动化
达达爱吃肉1 小时前
claude 接入deepseek 运行报错
java·服务器·前端