SpringBoot 开发环境热部署

开发修改代码后,无需重启idea的服务。

1 模块中添加依赖

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

2 父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+/ 调出 Maintenance 选择 Registry

选中:

compiler.automake.allow.when.app.running

actionSystem.assertFocusAccessFromEdt

 

 5.重启 Intellij IDEA

猜你喜欢

转载自www.cnblogs.com/vipsoft/p/12591771.html