Java Code Examples for org.springframework.boot.SpringBootVersion#getVersion()

The following examples show how to use org.springframework.boot.SpringBootVersion#getVersion() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpringBootBanner.java    From oneplatform with Apache License 2.0 6 votes vote down vote up
@Override
public void printBanner(Environment environment, Class<?> sourceClass,
		PrintStream printStream) {
	for (String line : BANNER) {
		printStream.println(line);
	}
	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();
}
 
Example 2
Source File: FlowableLiquibaseEnvironmentPostProcessor.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
protected String getLiquibaseProperty() {
    String springBootVersion = SpringBootVersion.getVersion();
    if (springBootVersion == null || !springBootVersion.startsWith("1")) {
        return "spring.liquibase.enabled";
    } else {
        return "liquibase.enabled";
    }
}
 
Example 3
Source File: CompatibilityVerifierAutoConfigurationTests.java    From spring-cloud-commons with Apache License 2.0 5 votes vote down vote up
@Test
public void verifierPropertiesContainsCurrentBootVersion() {
	String version = SpringBootVersion.getVersion();
	assertThat(version).isNotBlank();

	for (String compatibleVersion : verifierProperties.getCompatibleBootVersions()) {
		if (version.startsWith(stripWildCardFromVersion(compatibleVersion))) {
			// success we found the current boot version in our list of compatible
			// versions.
			return;
		}
	}
	fail(version + " not found in " + verifierProperties.getCompatibleBootVersions());
}
 
Example 4
Source File: AdminEndPointConfiguration.java    From Moss with Apache License 2.0 4 votes vote down vote up
@Bean
public SimpleInfoContributor springBootVersionInfoContributor() {
    return new SimpleInfoContributor("spring-boot-version", SpringBootVersion.getVersion());
}
 
Example 5
Source File: SpringDataReleaseCliBannerProvider.java    From spring-data-dev-tools with Apache License 2.0 4 votes vote down vote up
@Override
public String getVersion() {
	return "1.0 on Spring Boot " + SpringBootVersion.getVersion();
}
 
Example 6
Source File: SpringBootVersionVerifier.java    From spring-cloud-commons with Apache License 2.0 4 votes vote down vote up
String getVersionFromManifest() {
	return SpringBootVersion.getVersion();
}