JDWP调试SpringBoot程序
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-loader</artifactId>
</dependency>
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5050 -jar "D:\java\code_resp\github_resp\cnblogs\target\cnblogs-1.0-SNAPSHOT.jar"
使用上述方法可以让我们调试SpringBoot的启动代码,如JarLauncher
- 注意,命令行的suspend=y,表示要暂停