打开idea ,File->Settings-> Build-Execution-Deployment -> Compiler
勾选 Build Project Automatically.
按 Shift+Ctrl+A (windows,mac是 command+shift+A)
将看到弹窗 Enter Action or option name,输入"registry",双击第一项"Registry..." ,会弹出另一个窗口,寻找
这一项,并勾选开启。然后关闭窗口