IDEA 热部署

mac2022-07-05  18

第一:settings => compiler => build project automatically .

第二:CTRL + SHIFT + A,输入Registry,找到并勾选compiler.automake.allow.when.app.running,直接关闭即可第三:在项目中添加依赖

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

第四:添加插件支持:

<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin> </plugins> </build>

第五:配置应用文件

#开启热部署 spring.devtools.restart.enabled= true #设置重启的目录 spring.devtools.restart.additional-paths= src/main/java #设置文件修改不重启,相对于classpath spring.devtools.restart.exclude= WEB-INF/**

 

转载于:https://www.cnblogs.com/mobaids/p/11505679.html

相关资源:idea 热部署
最新回复(0)