Example usage for org.springframework.boot.devtools.restart SilentExitExceptionHandler setup

List of usage examples for org.springframework.boot.devtools.restart SilentExitExceptionHandler setup

Introduction

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

Prototype

static void setup(Thread thread) 

Source Link

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/*  ww  w.ja v  a2s  . 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());
}