Example usage for org.springframework.boot.system SystemProperties get

List of usage examples for org.springframework.boot.system SystemProperties get

Introduction

In this page you can find the example usage for org.springframework.boot.system SystemProperties get.

Prototype

public static String get(String... properties) 

Source Link

Usage

From source file:org.springframework.boot.system.EmbeddedServerPortFileWriter.java

/**
 * Create a new {@link EmbeddedServerPortFileWriter} instance with a specified file.
 * @param file the file containing port/*from   ww  w  .ja v  a 2  s .  c  om*/
 */
public EmbeddedServerPortFileWriter(File file) {
    Assert.notNull(file, "File must not be null");
    String override = SystemProperties.get(PROPERTY_VARIABLES);
    if (override != null) {
        this.file = new File(override);
    } else {
        this.file = file;
    }
}

From source file:org.springframework.boot.web.context.WebServerPortFileWriter.java

/**
 * Create a new {@link WebServerPortFileWriter} instance with a specified file.
 * @param file the file containing port/*  w w w .j av a 2  s.c  o m*/
 */
public WebServerPortFileWriter(File file) {
    Assert.notNull(file, "File must not be null");
    String override = SystemProperties.get(PROPERTY_VARIABLES);
    if (override != null) {
        this.file = new File(override);
    } else {
        this.file = file;
    }
}