Add below dependency to pom:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
Set your Intelij build settings to build project automatically
Applications that use
Enable automatic compilation
spring-boot-devtools
automatically restart whenever files on the classpath change. This can be a useful feature when working in an IDE, as it gives a very fast feedback loop for code changes. By default, any entry on the classpath that points to a folder is monitored for changes. Note that certain resources, such as static assets and view templates, do not need to restart the application.Enable automatic compilation
Get an improved JRebel development experience by enabling automatic compilation:
- Access Settings (Preferences on macOS).
- Select Build, Execution, Deployment > Compiler. Enable Build project automatically.
- Select Appearance & Behavior > System Settings. Enable Save files automatically if application is idle for. We recommend setting it to 10 seconds. (This is already enabled by default on IntelliJ 2018.1 and earlier.)
- Press OK.
- Press Ctrl+Shift+A (Cmd+Shift+A on macOS) and search for Registry. Open it to find and enable
compiler.automake.allow.when.app.running
(IntelliJ IDEA 15 and newer).
No comments:
Post a Comment