Saturday 26 October 2019

Spring boot Dev tools: Disable restart


If you want to disable the restart functionality providied by spring boot dev tools, set the property 'spring.devtools.restart.enabled' to false.

If you set the property 'spring.devtools.restart.enabled' in application.properties, spring initializes restart classloader, but it does not watch for file changes.

But if you want to disable the restart functionality completely (like do not want to initialize the restart class loader), then you need to set the 'spring.devtools.restart.enabled' System property to false.

Example
public static void main(String[] args) {
    System.setProperty("spring.devtools.restart.enabled", "false");
    SpringApplication.run(App.class, args);
}

Previous                                                    Next                                                    Home

No comments:

Post a Comment