新搭建的springboot项目启动报错Disconnected from the target VM, address: '127.0.0.1:2227', transport: 'socket'

新搭建的springboot项目除了选了个lombok以外什么都没选,等了半天加载完Maven以后启动项目就报错

Disconnected from the target VM, address: '127.0.0.1:2227', transport: 'socket'

网上找了下原因大概是因为端口冲突

解决办法:将pom文件中的spring-boot-starter

改成spring-boot-starter-web就好了

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

原文地址:https://www.cnblogs.com/ggq94/p/13437900.html