解决:Disconnected from the target VM, address: ‘127.0.0.1:2365‘, transport: ‘socket‘

我这篇文章说的是我出现这个问题的情况,至于其他的情况可以看这个文章,很详细:其他情况(侵删)
不过还是说一嘴,首先看看是不是端口号被占用了,这是最直观的问题。

下面说下我的情况:

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

这是我项目中Maven的一部分,这部分意思是要移除springboot内置的tomcat。所以就不能用springboot的application类去启动了,得用外置的tomcat去启动项目

猜你喜欢

转载自blog.csdn.net/wyzyysw/article/details/128397308