spring-boot-devtools 是一个非常好用的工具 文档请参考:https://docs.spring.io/spring-boot/docs/current/reference/html/using.html#using.devtools
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
您可以使用spring.devtools.restart.enabled
系统属性来控制此行为。要启用 devtools,无论用于启动应用程序的类加载器如何,请设置-Dspring.devtools.restart.enabled=true
系统属性。这不能在运行 devtools 存在安全风险的生产环境中完成。要禁用 devtools,请排除依赖项或设置-Dspring.devtools.restart.enabled=false
系统属性。
特殊说明: 解决问题的光鲜,藏着磕Bug的痛苦。 万物皆入轮回,谁也躲不掉! 以上文章,均是我实际操作,写出来的笔记资料,不会出现全文盗用别人文章!烦请各位,请勿直接盗用!