一、问题由来

本地代码在一次打包后,再次启动项目时报了一个错误,详细的错误信息如下:

2020-10-23 15:10:26.724 [] [main] INFO o.s.c.a.AnnotationConfigApplicationContext[583] - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@79d94571: startup date [Fri Oct 23 15:10:26 CST 2020]; root of context hierarchy
2020-10-23 15:10:26.880 [] [background-preinit] INFO o.h.validator.internal.util.Version[30] - HV000001: Hibernate Validator 5.3.6.Final
2020-10-23 15:10:26.927 [] [main] INFO o.s.b.f.a.AutowiredAnnotationBeanPostProcessor[155] - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2020-10-23 15:10:27.005 [] [main] INFO o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker[327] - Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$baa2b8f3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
Disconnected from the target VM, address: '127.0.0.1:1135', transport: 'socket'

最后一句的大致意思是 与 VM失去 连接。正常来说不应该啊,前一面还正常,打完war包后,再次启动就报了这个错,这到底是为什么呢?
二、问题分析

我反复尝试都是如此,启动其他子项目也是如此,报同样的错误。以前也没遇到过类似的错误,就把最后一句提示信息复制、粘贴出来放在百度里面进行搜索。

很开就找到了一个类似的答案,里面说是缺少 spring-boot-starter-web 这个依赖,

<dependency>

  <groupId>org.springframework.boot</groupId>

  <artifactId>spring-boot-starter-web</artifactId>

</dependency>

报着半信半疑的心态,去做了一次尝试,重新导入项目的maven依赖,重新启动项目还是报错。我也尝试着clean项目,然后重新启动项目,依然报错。

我也曾怀疑过是不是自己电脑的问题,重新启动电脑,打开IDE启动项目,仍然报错。
三、解决方案

经过仔细分析,我们现在开发的这个项目有多个子项目,这些子项目都依赖一个父工程,而依赖 spring-boot-starter-web 也是在父工程中控制的。

那么会不会是父工程中少了这个依赖,导致子项目中没有继承到呢?带着这样的疑问,我把父工程的pom.xml文件执行重新导入依赖的操作,然

后重新启动项目,正常启动,问题解决。看来那个作者说的是正确的,问题的原因就是少了springboot的启动依赖。

参考文章//https://blog.csdn.net/xu12387/article/details/87777153

Disconnected from the target VM, address: '127.0.0.1:1135', transport: 'socket'-SpringBoot启动报错的更多相关文章

  1. 使用 IDEA 创建 Maven Web 项目 (异常)- Disconnected from the target VM, address: '127.0.0.1:59770', transport: 'socket'

    运行环境: JDK 版本:1.8 Maven 版本:apache-maven-3.3.3 IDEA 版本:14 maven-jetty-plugin 配置: <plugin> <gr ...

  2. Disconnected from the target VM, address: '127.0.0.1:57178', transport: 'socket'

    idea 执行测试单元debug时控制台出现:Disconnected from the target VM, address: '127.0.0.1:57178', transport: 'sock ...

  3. Disconnected from the target VM, address: '127.0.0.1:56577', transport: 'socket'

    Disconnected from the target VM, address: '127.0.0.1:56577', transport: 'socket' Disconnected from t ...

  4. 关于 IDEA 启动 springboot 项目异常 - Disconnected from the target VM, address: '127.0.0.1:59770', transport: 'socket'

    关于 IDEA 启动 springboot 项目异常 - Disconnected from the target VM, address: '127.0.0.1:59770', transport: ...

  5. SpringBoot启动报错 Disconnected from the target VM, address: '127.0.0.1:2227', transport: 'socket'

    今天搭建了一个SpringBoot项目,刚启动就报错 Disconnected from the target VM, address: '127.0.0.1:2227', transport: 's ...

  6. Stopping service [Tomcat] Disconnected from the target VM, address:XXXXXX解决方案

    原文出处:https://blog.csdn.net/u013294097/article/details/90677049 Stopping service [Tomcat] Disconnecte ...

  7. Hadoop0.20.203.0在关机重启后,namenode启动报错(/dfs/name is in an inconsistent state)

    Hadoop0.20.203.0在关机重启后,namenode启动报错: 2011-10-21 05:22:20,504 INFO org.apache.hadoop.hdfs.server.comm ...

  8. 安装Oracle JDK 7.0与8.0 for Mac OS X后Eclipse启动报错的解决之道

    启动 Eclipse 时,直接报错The JVM shared library "/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Cont ...

  9. Debug运行项目时报错,connected to the target VM, address: '127.0.0.1:50495', transport: 'socket'

    Debug运行项目时报错,无法进入Debug,猜想出错原因可能是未正确关闭IDEA. 解决方法,先直接运行项目,然后停掉项目,再用Debug模式启动,问题解决.

随机推荐

  1. axios+Qs请求数据转表单格式

    import axios from 'axios' import qs from 'qs' axios.post('http://localhost:8888/baseitem/update', qs ...

  2. 处理IOS浏览器在input或者textarea获取焦点后底部留一块灰色空白区域的bug

    document.body.addEventListener('focusout',function() { window.scrollTo(0,0) },false);

  3. 并发编程(六)Object类中线程相关的方法详解

    一.notify() 作用:唤醒一个正在等待该线程的锁的线程 PS : 唤醒的线程不会立即执行,它会与其他线程一起,争夺资源 /** * Object类的notify()和notifyAll()方法详 ...

  4. Kubernetes客户端和管理界面大集合

    今天给大家介绍目前市面上常用的kubernetes管理工具,总有一款适合您~~~ 简介 Kubectl K9s Kubernetes-Dashboard Rancher Kuboard Lens Oc ...

  5. git server“丢失”commit问题探究

    1 背景 gitlab某仓库有同事发现部分代码文件内容丢失,具体表现 A. dev分支commit信息是连续的,看不出明显的大时间范围批量丢失 B. 以SuncardCashier/control/C ...

  6. explain为mysql关键字,不能作为表字段创建

    在用jpa自动建表时,字段名命名为了explain,发现报实体类与数据库表字段不一致的错,查询才发现explain是mysql的关键字,无法作为表字段建立,特此记录

  7. Excel文件内容无法显示解决方案

    问题描述: 双击打开一个excel文件,内容无显示,只能通过"打开"选项,选择文件,才能正常显示. 解决方法一: 1.[win+R]打开快速访问,输入"regedit&q ...

  8. 详解如何使用koa实现socket.io官网的例子

    socket.io官网中使用express实现了一个最简单的IM即时聊天,今天我们使用koa来实现一下利用 socket.io 实现消息实时推送 框架准备 1.确保你本地已经安装好了nodejs和np ...

  9. PHP_加密解密字符串

    PHP_加密解密字符串.php <?php //加解密字符串函数,可以加密中文 /* //加密 echo $encode = authcode('爱迪生', 'ENCODE', '3'); // ...

  10. Ansys Student 2020R2中Fluent编译UDF简介

    使用内建编译器 在Ansys Fluent中编译UDF一般都需要额外安装相应版本的Visual Studio编译器,VS的缺点是体量大,占空间,安装后还需要额外进行相关设置才能正常使用.而新版本的An ...