springboot DevTools热部署

1.在pom.xml中引入加DevTools

xml 复制代码
<!-- -devtools -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-devtools</artifactId>
    <optional>true</optional>
</dependency>

2.配置IDE自动编译

1.打开系统设置,设置自动编译:

2.设置IDEA Registry:

Mac环境下使用Command+Shift+A的快捷键,输入Registry,选择第一个

查找compiler.automake.allow.when.app.running:设置自动编译

如果没有compiler.automake.allow.when.app.running,就在高级设置里搜索,勾选就可以了

完成如上的设置,一般重启项目就可以使用热部署了。

相关推荐
亲爱的非洲野猪2 分钟前
从ReentrantLock到AQS:深入解析Java并发锁的实现哲学
java·开发语言
wheelmouse77884 分钟前
如何设置VSCode打开文件Tab页签换行
java·python
yangminlei6 分钟前
Spring Boot——日志介绍和配置
java·spring boot
廋到被风吹走13 分钟前
【Spring】Spring Boot Starter设计:公司级监控SDK实战指南
java·spring boot·spring
码头整点薯条18 分钟前
启动报错:Invalid value type for attribute ‘factoryBeanObjectType‘ 解决方案
java
沛沛老爹18 分钟前
Web开发者进阶AI:Agent Skills-深度迭代处理架构——从递归函数到智能决策引擎
java·开发语言·人工智能·科技·架构·企业开发·发展趋势
工具罗某人21 分钟前
docker快速部署kafka
java·nginx·docker
秋饼23 分钟前
【手撕 @EnableAsync:揭秘 SpringBoot @Enable 注解的魔法开关】
java·spring boot·后端
Good_Starry26 分钟前
Java——正则表达式
java·开发语言·正则表达式
萤丰信息29 分钟前
开启园区“生命体”时代——智慧园区系统,定义未来的办公与生活
java·大数据·运维·数据库·人工智能·生活·智慧园区