Spring Boot 3.x 全新的热部署配置方式详解(IntelliJ IDEA 2023.1)
今天在暨大给学生上课的时候,发现在 Spring Boot 项目中配置热部署的方式有一丢丢的改变,具体往下看。
最近还把 IDEA 更新到了 IntelliJ IDEA 2023.1 版本
第一步,在 pom.xml 文件中添加依赖
<!--热部署配置 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <!-- 表示依赖不向下传递 --> <optional>true</optional> </dependency>
第二步,配置 Build project automatically
如果你用的是 Windows 系统,请按照 file -> settings -> Build, Execution, Deployment -> compiler 这个路径找到 build project automatically 并勾上,最后 Apply 和 OK 即可;
如果你用的是 Mac 系统,请按照 IntelliJ IDEA -> settings -> Build, Execution, Deployment -> compiler 这个路径找到 build project automatically 并勾上,最后 Apply 和 OK 即可。
第三步,开启允许在运行中修改文件
如果你用的是 Windows 系统,请按照 file -> settings -> Advanced Settings 这个路径找到 Allow auto-make to start even if developed application is currently running 并勾上,最后 Apply 和 OK 即可;
如果你用的是 Mac 系统,请按照 IntelliJ IDEA -> settings -> Advanced Settings 这个路径找到 Allow auto-make to start even if developed application is currently running 并勾上,最后 Apply 和 OK 即可;
到此这篇关于Spring Boot 3.x 全新的热部署配置方式(IntelliJ IDEA 2023.1)的文章就介绍到这了,更多相关Spring Boot 3.x 热部署配置内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
相关文章
Reactor中的onErrorContinue 和 onErrorResume
这篇文章主要介绍了Reactor中的onErrorContinue 和 onErrorResume,文章围绕主题展开详细的内容介绍,具有一定的参考价值,需要的朋友可以参考一下2022-09-09Servlet注解之@WebInitParam多个InitParam的使用
这篇文章主要介绍了Servlet注解之@WebInitParam多个InitParam的使用,具有很好的参考价值,希望对大家有所帮助。如有错误或未考虑完全的地方,望不吝赐教2023-04-04
最新评论