SpringBoot 在IDEA中实现热部署(实用版)

mac2024-03-06  27

先在pom.xml中加这两个依赖

<!-- 热部署依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> <scope>true</scope> </dependency> <!-- 添加spring-boot-maven-plugin --> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <!-- 如果没有该项配置,devtools不会起作用,即应用不会restart --> <fork>true</fork> </configuration> </plugin> </plugins> </build>

然后再看这个网址

https://www.jianshu.com/p/f658fed35786

最新回复(0)