All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.otto.edison.status.configuration.VersionInfoConfiguration Maven / Gradle / Ivy

There is a newer version: 3.3.3
Show newest version
package de.otto.edison.status.configuration;

import de.otto.edison.status.domain.VersionInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.info.GitProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Configuration of the application's version.
 * 

* VersionInfo is used to give information about the current service's version on a status page. *

*/ @Configuration @EnableConfigurationProperties(VersionInfoProperties.class) public class VersionInfoConfiguration { @Autowired(required = false) private GitProperties gitProperties = null; @Bean @ConditionalOnMissingBean(VersionInfo.class) public VersionInfo gitInfo(final VersionInfoProperties versionInfoProperties) { return VersionInfo.versionInfo(versionInfoProperties, gitProperties); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy