启动SpringBoot 项目服务报错The port may already be in use or the connector may be misconfigured

在SpringBoot体系中,经常会遇到因为一些情况需要使用直接关闭某个服务的情况,然后你再次启动时很可能会提示:

The port may already be in use or the connector may be misconfigured

其实出现这个问题的原因很简单,就是原本的服务没有正确地被关闭,然后就会出现刚才的那些报错,所以我们要做到就是将原本占用这个端口的进程关闭即可。下面假设我们的10000端口被占用了,我们一步步解决它:

 

1、找出占用该端口的进程号:

打开CMD窗口,输入:

netstat -ano|findstr 10000

启动SpringBoot 项目服务报错The port may already be in use or the connector may be misconfigured

 

2、查到端口号对应的进程号。输入:

taskkill /f /t /im  进程号

启动SpringBoot 项目服务报错The port may already be in use or the connector may be misconfigured

 

 

3、重启服务服务即可

 

启动SpringBoot 项目服务报错The port may already be in use or the connector may be misconfigured