SpringBoot_05_热部署和debug

一、pom.xml配置

增加以下pom.xml配置

 <!--1.spring-boot插件-->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <fork>true</fork>
                    <jvmArguments>
                        -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
                    </jvmArguments>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>springloaded</artifactId>
                        <version>1.2.6.RELEASE</version>
                    </dependency>
                </dependencies>
            </plugin>

 

二、添加一个remote

在工具栏中的Run -> Edit Configurations... -> Remote,

新建一个启动项,什么都不用改,但为了方便名字随便起一个你能区分开的就行,

我这里叫debug了

 

三、以debug方式启动

1.执行 spring-boot:run

2.以 debug 方式启动 remote

 

 

 

 

 

 

 

二、参考资料

1.SpringBoot 热加载以及添加debug调试

posted @ 2018-03-12 15:38  shirayner  阅读(361)  评论(0编辑  收藏  举报