一、问题由来

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

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. POI和EasyExcel的使用

    1.POI使用 1.1 什么是POI POI简介(Apache POI),Apache POI是Apache软件基金会的开放源码函式库,POI提供API给Java程序对Microsoft Office ...

  2. Autofac的使用

    Autofac的使用 「Autofac简介」 「基本的使用方式」 「如何实现webapi控制器自动注入接口」 一.Autofac简介 ❝ Autofac是实现依赖注入的类库之一,他可以帮助你实现程序的 ...

  3. 腾讯云ClickHouse如何实现自动化的数据均衡?

    ​一.引言 ClickHouse 是一个用于联机分析( OLAP )的列式数据库管理系统( DBMS ).它于 2016 年以 Apache 2.0 协议开源,以优秀的查询性能,深受广大大数据工程师欢 ...

  4. python爬取酷狗音乐

    url:https://www.kugou.com/yy/html/rank.html 我们随便访问一个歌曲可以看到url有个hash https://www.kugou.com/song/#hash ...

  5. DVWA SQL-injection 附python脚本

    SQL-Injection low等级 首先我们将dvwa等级调到low 如图 接下来选择SQL Injection,并在提交框中输入正常值1,查看返回结果 接下来检测是否存在注入,分别输入 1' a ...

  6. 测试工具-XPath使用

    XML有两种MIME类型,即application/xml和text/xml,在HTTP中,MIME Type类型被定义在Content-Type header中.我们经常也会看到接口返回数据类型为X ...

  7. spring整合(Junit、web)

    1.整合Junit (1)整合前的测试类代码 public class Test { public static void main(String[] args) { ApplicationConte ...

  8. Magicodes.IE之花式导出

    总体设计 Magicodes.IE是一个导入导出通用库,支持Dto导入导出以及动态导出,支持Excel.Word.Pdf.Csv和Html.在本篇教程,笔者将讲述如何使用Magicodes.IE进行花 ...

  9. 基于NPOI的Excel导入导出类库

    概述 支持多sheet导入导出.导出字段过滤.特性配置导入验证,非空验证,唯一验证,错误标注等 用于基础配置和普通报表的导入导出,对于复杂需求,比如合并列,公式,导出图片等暂不支持 GitHub地址: ...

  10. vscode写latex的正反向搜索问题

    vscode写latex的正反向搜索问题 vscode使用LaTeX Workshop + TexLive时可以很舒畅的写作 但是在长篇写作时,会涉及到正反向搜索的需求.即根据源码搜pdf的位置,和根 ...