idea 热部署Devtools
2021/4/7 18:39:22
本文主要是介绍idea 热部署Devtools,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
开发时使用,生产环境关闭
1.Adding devtools to your project
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
2.Adding plugin to your pom.xml
下段配置复制到项目pom.xml文件或者父类总工程的pom.xml中
<plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <addResources>true</addResources> </configuration> </plugin> </plugins>
3.Enabling automatic build
在idea中做如下设置
File -> Settings(New Project Settings->Settings for New Projects) ->Complier
下面项勾选
- Automatically show first error in editor
- Display notification on build completion
- Build project automatically
- Compile independent modules in parallel
4.Update the value of
在idea中,键入如下快捷键,使得idea允许热部署:
键入Ctrl + Shift + Alt + / ,(如果是mac,则快捷键是:Command + Shift + Alt + / )打开Registry,勾选:
- compiler.automake.allow.when.app.running
- actionSystem.assertFocusAccessFromEdt
5.重启IDEA
这篇关于idea 热部署Devtools的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-05-19永别了,微服务架构!
- 2024-05-15鸿蒙生态设备数量超8亿台
- 2024-05-13TiDB + ES:转转业财系统亿级数据存储优化实践
- 2024-05-09“2024鸿蒙零基础快速实战-仿抖音App开发(ArkTS版)”实战课程已上线
- 2024-05-09聊聊如何通过arthas-tunnel-server来远程管理所有需要arthas监控的应用
- 2024-05-09log4j2这么配就对了
- 2024-05-09nginx修改Content-Type
- 2024-05-09Redis多数据源,看这篇就够了
- 2024-05-09Google Chrome驱动程序 124.0.6367.62(正式版本)去哪下载?
- 2024-05-09有没有大佬知道这种数据应该怎么抓取呀?