2022-10-06 12:59:26 +02:00
|
|
|
package eu.dnetlib.validatorapi.configuration;
|
|
|
|
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
2023-05-30 10:09:06 +02:00
|
|
|
import org.springframework.validation.annotation.Validated;
|
2022-10-06 12:59:26 +02:00
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
@ConfigurationProperties("validatorapi.globalVars")
|
2023-05-30 10:09:06 +02:00
|
|
|
@Validated
|
2022-10-06 12:59:26 +02:00
|
|
|
public class GlobalVars {
|
|
|
|
public static Date date = new Date();
|
2023-05-30 10:09:06 +02:00
|
|
|
private String buildDate;
|
2022-10-06 12:59:26 +02:00
|
|
|
private String version;
|
|
|
|
|
|
|
|
public String getBuildDate() {
|
|
|
|
if(buildDate == null) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
return buildDate.toString();
|
|
|
|
}
|
|
|
|
|
2023-05-30 10:09:06 +02:00
|
|
|
public void setBuildDate(String buildDate) {
|
2022-10-06 12:59:26 +02:00
|
|
|
this.buildDate = buildDate;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getVersion() {
|
|
|
|
return version;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setVersion(String version) {
|
|
|
|
this.version = version;
|
|
|
|
}
|
|
|
|
}
|