Example usage for org.springframework.boot SpringBootVersion getVersion

List of usage examples for org.springframework.boot SpringBootVersion getVersion

Introduction

In this page you can find the example usage for org.springframework.boot SpringBootVersion getVersion.

Prototype

public static String getVersion() 

Source Link

Document

Return the full version string of the present Spring Boot codebase, or null if it cannot be determined.

Usage

From source file:com.ebay.logstorm.server.utils.EagleBanner.java

@Override
public void printBanner(Environment environment, Class<?> sourceClass, PrintStream printStream) {
    for (String line : BANNER) {
        printStream.println(line);//from  w  w  w.jav a  2 s  . c o  m
    }
    String version = SpringBootVersion.getVersion();
    version = (version == null ? "" : " (v" + version + ")");
    String padding = "";
    while (padding.length() < STRAP_LINE_SIZE - (version.length() + SPRING_BOOT.length())) {
        padding += " ";
    }
    printStream.println(AnsiOutput.toString(AnsiColor.GREEN, SPRING_BOOT, AnsiColor.DEFAULT, padding,
            AnsiStyle.FAINT, version));
    printStream.println();
}

From source file:org.springframework.boot.ResourceBanner.java

protected String getBootVersion() {
    return SpringBootVersion.getVersion();
}