1、Identify and stop the process that’s listening on port 8080 or configure this application to listen on another port.
如图:
字面意思:
识别并停止监听端口8080的进程,或将此应用程序配置为监听另一个端口。
意思是我们要使用的端口已被占用。
方法一:关闭进程
打开cmd 输入命令, 查看占用端口的进程号
命令:#netstat -ano | findstr 8080,输出结果如下:
从图中红圈可以看出 进程为 8456
使用cmd命令将此进程终止
命令:#taskkill /F /PID 8456
重新启动springboot应用
成功启动。
方法二:修改springboot配置
在springboot资源目录 resources下寻找application.propertis文件
输入如下(不一定要8080端口,只要是空闲的端口都可)
server.port= 8000
这样springboot tomcat将会使用8000端口 从而不会造成端口冲突
重新启动springboot应用
成功启动。