zoukankan      html  css  js  c++  java
  • spring boot 调试

    在bash脚本中的启动方式:

    #!/bin/bash
    JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
    nohup  java -jar $JAVA_OPTS  scheduler-0.0.1.jar --spring.profiles.active=prod >/dev/null 2>&1 &

    JAVA_OPTS的双引号不能少,否则报错

    命令行方式:

    mvn spring-boot:run -Drun.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"

    需要在idea 中edit configuration->+ -> remote->debug

    rum main方法:

    debug run

    热部署

    在pom里添加:

    复制代码
    <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <fork>true</fork>
                    </configuration>
                    <dependencies>
                        <!-- spring热部署-->
                        <dependency>
                            <groupId>org.springframework</groupId>
                            <artifactId>springloaded</artifactId>
                            <version>1.2.6.RELEASE</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </build>
    复制代码

    然后修改类后,在idea中重新编译该类:build->recompile XXXX

    或者使用快捷键ctrl+shif+F9

    So do it,and change it,no regret!
    http://www.cnblogs.com/woshimrf/p/5625360.html
  • 相关阅读:
    Mysq数据库备份(win)
    Mysql保存中文乱码问题
    MySql常用操作
    win下 mysql远程连接设置
    windows下redis的使用
    栈和队列
    ffmpeg 常用命令
    nginx https配置模板
    openssl 、nginx生成配置自签名证书
    https、公钥,私钥,数字证书
  • 原文地址:https://www.cnblogs.com/softidea/p/5759332.html
Copyright © 2011-2022 走看看