[Trunk | Authorization Service]:
1. pom.xml: a. Added timestamp in properties. b. In <build> added <resources> with filtering set to true. 2. GlobalVars.java: Added GlobalVars class for date of deploy & date of build. 3. AuthorizationConfiguration.java: In @EnableConfigurationProperties added GlobalVars.class. 4. AuthorizationLibraryCheckDeployController.java: Added exposing date of deploy and date of build. 5. authorization.properties: Added property authorization.globalVars.buildDate=@timestamp@master
parent
8a52aea7b6
commit
4dff8c29c3
@ -0,0 +1,22 @@
|
||||
package eu.dnetlib.uoaauthorizationlibrary.configuration;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ConfigurationProperties("authorization.globalVars")
|
||||
public class GlobalVars {
|
||||
public static Date date = new Date();
|
||||
private Date buildDate;
|
||||
|
||||
public String getBuildDate() {
|
||||
if(buildDate == null) {
|
||||
return null;
|
||||
}
|
||||
return buildDate.toString();
|
||||
}
|
||||
|
||||
public void setBuildDate(Date buildDate) {
|
||||
this.buildDate = buildDate;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue