一、问题由来

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

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. turtle空间坐标系

    利用空间坐标改变行进 以海龟的角度来看,无论往那个方向运行,都叫正方向 turtle.fd向海龟的正前方运行,turtle.bk向反方向运行

  2. 360 Atlas生产环境使用心得

    一.Atlas介绍 Atlas是360开源的一个Mysql Proxy,以下是官方介绍: Atlas是由 Qihoo 360公司Web平台部基础架构团队开发维护的一个基于MySQL协议的数据中间层项目 ...

  3. redis并发问题2

    转自https://mp.weixin.qq.com/s?__biz=MzI1NDQ3MjQxNA==&mid=2247485464&idx=1&sn=8d690fc6f878 ...

  4. 配置静态 IP、网卡命名规范

    一.网卡命名规范(设备类型 + 设备位置 + 数字) 设备类型: 格式 描述 en 以太网(Ethernet) ib 无限宽带(InfiniBand) sl 串列线路互联网协议(slip:Serial ...

  5. Linux:改变世界的一次代码提交

    摘要:如果选Linux社区历史上最伟大的一次 Git 代码提交,那一定是 Git 工具项目本身的第一次代码提交. 吾诗已成.无论大神的震怒,还是山崩地裂,都不能把它化为无形! -- 奥维德<变形 ...

  6. UCanCode发布升级E-Form++可视化源码组件库2020全新版 !

    2020年. 中国.成都 UCanCode发布升级E-Form++可视化源码组件库2020全新版 ! --- 全面性能提升,UCanCode有史以来最强大的版本发布! E-Form++可视化源码组件库 ...

  7. java 判断jsonObject 对象为null的天坑问题

    jsonObject = {"mmbRetrieveBookingResponse":{"bookingData":null,"isAfterTran ...

  8. Hbuilder给手机发送短信与拨打电话

    前言:业务场景 需要给手机号码拨打电话与发送短信.html5已经提供接口. methods: { Call: function() { var that = this; if(that.ptel == ...

  9. Python练习题 045:Project Euler 017:数字英文表达的字符数累加

    本题来自 Project Euler 第17题:https://projecteuler.net/problem=17 ''' Project Euler 17: Number letter coun ...

  10. Python练习题 043:Project Euler 015:方格路径

    本题来自 Project Euler 第15题:https://projecteuler.net/problem=15 ''' Project Euler: Problem 15: Lattice p ...