IDEA开启项目热部署

    科技2024-04-17  11

    1.在项目中添加devtools

    <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>

    2.将插件添加到pom.xml文件

    下一段配置黏贴到工程当中的pom.xml里 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <addResources>true</addResources> </configuration> </plugin> </plugins> </build>

    3.启用自动生成

     4.更新设置,按快捷键“Ctrl+Shift+Alt”即可打开

    5.重启IDEA 

    Processed: 0.016, SQL: 9