您的位置:首页技术文章
文章详情页

springboot项目idea热部署的教程详解

浏览:2日期:2023-05-02 14:05:08

1.添加依赖

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <scope>true</scope> </dependency>

2.开启自动编译

springboot项目idea热部署的教程详解

3.ctrl+shifi+alt+/

点击registry

springboot项目idea热部署的教程详解

选择compiler autoMake allow when app running

springboot项目idea热部署的教程详解

接下来在你进行项目修改切换到浏览器时就会发现springboot重新加载了

4.排除热部署范围

将不需要热部署的路径定义到配置文件中

spring.devtools.restart.exclude=static/**,public/**

总结

到此这篇关于springboot项目idea热部署的文章就介绍到这了,更多相关springboot项目idea热部署内容请搜索好吧啦网以前的文章或继续浏览下面的相关文章希望大家以后多多支持好吧啦网!

标签: Spring
相关文章: