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

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

Introduction

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

Prototype

void add(Map<?, ?> properties) 

Source Link

Usage

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

static DevToolsSettings load(String location) {
    try {//from  www.  j a v  a  2s. com
        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);
    }
}