Springboot 打成jar包后 结合idea remote 远程debug

1、将测试demo打成jar

2、 将jar放到某个目录下,并运行起来

bash 复制代码
java -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:10087 base_admin-1.0.0.jar 

3、在Idea中编辑Remote调试

4、在浏览器中打开刚启动的jar,比如我的项目地址:http://127.0.0.1:10086/doc.html![](https://file.jishuzhan.net/article/1768877812904628226/a400eed7eddc272a7cf79583a05d3269.webp)

5、在要调试debug的代码位置加入断点,并启动Remote,然后在浏览器调用要调试的接口地址,比如我的要调试地址:http://127.0.0.1:10086/home2/test

相关推荐
vx-程序开发8 分钟前
【java项目分享】springboot农产品销售平台14952
java·javascript·spring boot·python·eclipse·django·php
骇客野人1 小时前
IntelliJ IDEA 菜单中英对照
java·ide·intellij-idea
敲代码的嘎仔2 小时前
从零搭建微服务:Spring Cloud Alibaba 全家桶踩坑实录(Nacos + OpenFeign + Gateway + Sentinel)
java·spring boot·spring·spring cloud·微服务·gateway·sentinel
IT界的老黄牛12 小时前
Spring Boot 的 `/actuator/health` 不是免费的:健康检查打爆连接池的反面教材
spring boot·hikaricp·actuator·健康检查·线上排障·架构反模式
摇滚侠17 小时前
《SpringBoot 3:入门与应用实战》第 15 章 生产级特性 管理 Spring Boot 应用 阅读笔记
java·spring boot·笔记
XWalnut18 小时前
SpringBoot快速入门
java·spring boot·后端
就改了19 小时前
SpringBoot 自定义线程池 + 实时监控指标
java·spring boot·后端
摇滚侠21 小时前
《SpringBoot 3:入门与应用实战》第 15 章 生产级特性 监控指标 Metrics 阅读笔记
java·spring boot·笔记
骇客野人1 天前
IDEA 安装 Trae(TRAE AI: Coding Assistant)完整步骤
java·ide·intellij-idea
骇客野人1 天前
IntelliJ IDEA 使用技巧
java·ide·intellij-idea