IDEA的自动编译功能不像Eclipse是自动开启的,所以每次编码完成需要ctrl+f9去运行编译,当我们使用spring-boot-devtools等类似工具时不能达到自动热部署功能,需要先运行手动编译很不方便。下面是开启IDEA自动编译的方法:

  1. 打开settings界面:File->Settings
  2. 选中Compiler选项:Build,Execution,Deployment->Compiler
  3. 选中Make project automatically