idea默认是不能进行自动编译的,可是它也一样提供了自动编译的功能,只是须要咱们手动设置一下。
否则合并过代码后,没有自动编译,就须要rebuild来查看错误,若是能进行自动编译,就能够直接提示咱们了,会省不少事儿呢。若是是常常开发页面的话,HTML,css,js常常须要改动的,若是每次都重启岂不累死了。废话很少说。css
1、开启idea自动make功能 spring
一、CTRL + SHIFT + A --> 查找make project automatically --> 选中
二、CTRL + SHIFT + A --> 查找Registry --> 找到并勾选compiler.automake.allow.when.app.running。(或者使用快捷键:CTRL + SHIFT + ALT + /)app
重启idea maven
2、使用spring-boot-1.3开始有的热部署功能
一、加maven依赖 ide
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependency>
二、开启热部署 spring-boot
<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> </configuration> </plugin> </plugins> </build>