0
点赞
收藏
分享

微信扫一扫

使用devtools开启热部署

飞鸟不急 2022-06-28 阅读 75

一、pom.xml添加依赖

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>4.0.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

二、devtools配置

spring:
devtools:
restart:
enabled: true #开启热部署
additional-paths: src/main/java #重启目录

三、修改idea配置

使用devtools开启热部署_spring
然后Ctrl+Shift+Alt+/
使用devtools开启热部署_ide_02


举报

相关推荐

0 条评论