<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.3.RELEASE</version>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
private static final Logger LOGGER = LoggerFactory.getLogger(YourSpringApplication.class);
@Autowired
BuildProperties buildProperties;
public static void main(String[] args) {
SpringApplication.run(YourSpringApplication.class, args);
}
@PostConstruct
private void logVersion() {
LOGGER.info(buildProperties.getName());
LOGGER.info(buildProperties.getVersion());
LOGGER.info(buildProperties.get("time"));
LOGGER.info(buildProperties.getGroup());
}