spring-boot使用热部署后在Eclipse中Debug调试就跳转到exitCurrentThread
【spring-boot使用热部署后在Eclipse中Debug调试就跳转到exitCurrentThread】spring-boot热部署可以当修改了class之后自动重启项目,方便调试。在pom.xml中添加
org.springframework.boot
spring-boot-devtools
true
在plugin中添加fork
org.springframework.boot
spring-boot-maven-plugin
true
配置后后可以自动重启。
但debug时发现,第一次启动会莫名进入SilentExitExceptionHandler.exitCurrentThread方法。看日志发现线程名从main变成了restartedMain,应该是此处引起线程退出,自己没有打断点,无法取消。百度一下,Eclipse有配置:window->【Preferences】->【Java】->【Debug】:去掉【Suspend execution on uncaught exceptions】前面的勾。
11:38:46.080 [main] DEBUG org.springframework.boot.devtools.restart.ChangeableUrls - Matching URLs for reloading : [file:/E:/workspace/nidap-logservice/target/classes/, file:/C:/workspace/pine-sql/target/classes/]._______ _ _
/\\ / ___'_ __ _ _(_)_ ____ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/___)| |_)| | | | | || (_| |) ) ) )
'|____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::(v2.0.1.RELEASE)2018-08-02 11:38:46.988INFO 31872 --- [restartedMain] c.t.n.logservice.LogServiceApplication: Starting LogServiceApplication on DESKTOP-U8R517O with PID 31872 (E:\workspace\nidap-logservice\target\classes started by admin in E:\workspace\nidap-logservice)
推荐阅读
- 热闹中的孤独
- 由浅入深理解AOP
- 【译】20个更有效地使用谷歌搜索的技巧
- mybatisplus如何在xml的连表查询中使用queryWrapper
- MybatisPlus|MybatisPlus LambdaQueryWrapper使用int默认值的坑及解决
- MybatisPlus使用queryWrapper如何实现复杂查询
- iOS中的Block
- Linux下面如何查看tomcat已经使用多少线程
- 使用composer自动加载类文件
- android|android studio中ndk的使用