Example usage for org.springframework.boot.devtools.restart RestartInitializer getInitialUrls

List of usage examples for org.springframework.boot.devtools.restart RestartInitializer getInitialUrls

Introduction

In this page you can find the example usage for org.springframework.boot.devtools.restart RestartInitializer getInitialUrls.

Prototype

URL[] getInitialUrls(Thread thread);

Source Link

Document

Return the initial set of URLs for the Restarter or null if no initial restart is required.

Usage

From source file:org.springframework.boot.devtools.restart.Restarter.java

/**
 * Internal constructor to create a new {@link Restarter} instance.
 * @param thread the source thread//from  w ww  .  j a  va 2s  .c o  m
 * @param args the application arguments
 * @param forceReferenceCleanup if soft/weak reference cleanup should be forced
 * @param initializer the restart initializer
 * @see #initialize(String[])
 */
protected Restarter(Thread thread, String[] args, boolean forceReferenceCleanup,
        RestartInitializer initializer) {
    Assert.notNull(thread, "Thread must not be null");
    Assert.notNull(args, "Args must not be null");
    Assert.notNull(initializer, "Initializer must not be null");
    this.logger.debug("Creating new Restarter for thread " + thread);
    SilentExitExceptionHandler.setup(thread);
    this.forceReferenceCleanup = forceReferenceCleanup;
    this.initialUrls = initializer.getInitialUrls(thread);
    this.mainClassName = getMainClassName(thread);
    this.applicationClassLoader = thread.getContextClassLoader();
    this.args = args;
    this.exceptionHandler = thread.getUncaughtExceptionHandler();
    this.leakSafeThreads.add(new LeakSafeThread());
}