跑若依项目的时候,突然遇到的。在网上找了很多方法,看日志也以为是 maven 插件的原因,但是试了将 maven-plugin 改成 1.6.0,直接报错。
网上有方法说不要运行 main 方法,我试了一下,改成 junit 运行,日志打印 8080 端口被占用
org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.PortInUseException: Port 8080 is already in use
cmd 查看了一下明确是这样的
kill进程