springboot

配置远程调试

在192.168.0.204这台机器上运行abc.jar

java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=n -jar abc.jar

注意日志中会打印Listening for transport dt_socket at address: 5005

然后在本地idea中依次如下操作:
菜单Run -> Edit Configurations -> 左上角'+' -> Remote -> host填192.168.0.204,然后运行这个remote。
然后在本地添加断点,访问 http://192.168.0.204:8080,会发现进入本地断点了。

注意本地代码和服务端运行的abc.jar的代码要一样。

自动装配

@SpringBootApplication

功能

springboot配置数据源.md

作者:张三  创建时间:2024-12-26 19:45
最后编辑:张三  更新时间:2024-12-26 19:45