在使用IDEA开发Spring Boot application时,如果使用Devtools依赖包时,可以配置automake来实现文件修改后自动build,deploy并不手动重启server的情况下测试改动。配置如下:

1) create Spring Boot project with SB V1.3 and add "Devtools" (1*) to dependencies

2) invoke Help->Find Action... and type "Registry", in the dialog search for "automake" and enable the entry "compiler.automake.allow.when.app.running", close dialog

3) enable background compilation in Settings->Build, Execution, Deployment->Compiler "Make project automatically"

4) open Spring Boot run config, you should get warning message if everything is configured correctly

5) Run your app, change your classes on-the-fly

 

发表评论