欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

springboot项目启动控制台显示端口被占用解决方法

程序员文章站 2022-07-01 15:43:24
控制台启动报错: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2020-04-24 16:39:29.231 ERRO ......

控制台启动报错:

error starting applicationcontext. to display the conditions report re-run your application with 'debug' enabled.
2020-04-24 16:39:29.231 error 2864 --- [ restartedmain] 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.

,显示端口8080被占用

springboot项目启动控制台显示端口被占用解决方法

 

 第一种解决方法,win+r 打开cmd ,输入命令 netstat -aon 查看进程,找到8080

springboot项目启动控制台显示端口被占用解决方法

 

 输入命令格式:taskkill /t /f /pid 进程id,杀掉8080进程,比如:taskkill /t /f /pid 6736

springboot项目启动控制台显示端口被占用解决方法

 

第二种方法:修改配置文件端口,比如改为8081,8082

springboot项目启动控制台显示端口被占用解决方法

 这样是很不方便,每次都需要修改端口或kill掉进程,在pom文件中把fork改为false就行

springboot项目启动控制台显示端口被占用解决方法