intellij中springboot熱部署

1、開啓idea自動make功能 spring

一、CTRL + SHIFT + A --> 查找make project automatically --> 選中 瀏覽器

二、CTRL + SHIFT + A --> 查找Registry --> 找到並勾選compiler.automake.allow.when.app.running 緩存

最後重啓idea app

2、使用spring-boot-1.3開始有的熱部署功能 
一、加maven依賴maven

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

二、開啓熱部署ide

複製代碼

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

複製代碼

3、Chrome禁用緩存 
F12(或Ctrl+Shift+J或Ctrl+Shift+I)--> NetWork --> Disable Cache(while DevTools is open) spring-boot

至此,在idea中就能夠愉快的修改代碼了,修改後能夠及時看到效果,無須手動重啓和清除瀏覽器緩存ui

相關文章
相關標籤/搜索