Springboot启动报错 Disconnected from the target VM 解决过程


使用Starting with Spring Initializr新建了一个spring boot 2.0项目,下载下来以后导入idea,debug方式启动失败,报错如下

网上查找解决办法,很多都说端口占用导致的,使用CMD 输入命令 netstat -ano 查看端口7343被哪个进程占用,结果发现这个端口没有被占用,

结论:端口占用会导致这个错误,但是这个错误不一定是端口占用导致的

继续找办法,csdn一个帖子(https://blog.csdn.net/xu12387/article/details/87777153)提到是maven没有引入 spring-boot-starter-web也会报这个错,

修改pom文件,加入如下启动依赖,重启服务,错误消失

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

在此感谢网友分享:)

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM