oparl-service/template-server/src/main/java/de/twomartens/templateservice/TemplateServiceApplication....

30 lines
947 B
Java

package de.twomartens.templateservice;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import java.util.Optional;
@Slf4j
@SpringBootApplication
@EnableScheduling
public class TemplateServiceApplication {
public static void main(String[] args) {
log.info(">>> {}:{} <<<", getTitle(), getVersion());
SpringApplication.run(TemplateServiceApplication.class, args);
}
private static String getTitle() {
return Optional.ofNullable(TemplateServiceApplication.class.getPackage().getImplementationTitle())
.orElse("start");
}
private static String getVersion() {
return Optional.ofNullable(TemplateServiceApplication.class.getPackage().getImplementationVersion())
.orElse("snapshot");
}
}