Example usage for org.springframework.boot.devtools.settings DevToolsSettings DevToolsSettings

List of usage examples for org.springframework.boot.devtools.settings DevToolsSettings DevToolsSettings

Introduction

In this page you can find the example usage for org.springframework.boot.devtools.settings DevToolsSettings DevToolsSettings.

Prototype

DevToolsSettings() 

Source Link

Usage

From source file:org.springframework.boot.devtools.settings.DevToolsSettings.java

static DevToolsSettings load(String location) {
    try {//from w  w  w  .j a v  a  2 s  . c o  m
        DevToolsSettings settings = new DevToolsSettings();
        Enumeration<URL> urls = Thread.currentThread().getContextClassLoader().getResources(location);
        while (urls.hasMoreElements()) {
            settings.add(PropertiesLoaderUtils.loadProperties(new UrlResource(urls.nextElement())));
        }
        if (logger.isDebugEnabled()) {
            logger.debug("Included patterns for restart : " + settings.restartIncludePatterns);
            logger.debug("Excluded patterns for restart : " + settings.restartExcludePatterns);
        }
        return settings;
    } catch (Exception ex) {
        throw new IllegalStateException(
                "Unable to load devtools settings from " + "location [" + location + "]", ex);
    }
}