List of usage examples for org.springframework.boot.devtools.restart Restarter Restarter
protected Restarter(Thread thread, String[] args, boolean forceReferenceCleanup, RestartInitializer initializer)
From source file:org.springframework.boot.devtools.restart.Restarter.java
/** * Initialize restart support for the current application. Called automatically by * {@link RestartApplicationListener} but can also be called directly if main * application arguments are not the same as those passed to the * {@link SpringApplication}.//from w ww . j a v a 2 s. c o m * @param args main application arguments * @param forceReferenceCleanup if forcing of soft/weak reference should happen on * each restart. This will slow down restarts and is intended primarily for testing * @param initializer the restart initializer * @param restartOnInitialize if the restarter should be restarted immediately when * the {@link RestartInitializer} returns non {@code null} results */ public static void initialize(String[] args, boolean forceReferenceCleanup, RestartInitializer initializer, boolean restartOnInitialize) { if (instance == null) { synchronized (Restarter.class) { instance = new Restarter(Thread.currentThread(), args, forceReferenceCleanup, initializer); } instance.initialize(restartOnInitialize); } }