[Trunk | Monitor 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. UoaMonitorServiceApplication.java: a. Added @PropertySource("classpath:admintoolslibrary.properties") and @PropertySource("classpath:notification.properties") b. In @EnableConfigurationProperties added GlobalVars.class. 4. MonitorServiceCheckDeployController.java: Added exposing date of deploy and date of build. 5. monitorservice.properties: Added property monitorservice.globalVars.buildDate=@timestamp@pull/1/head
parent
7d4273bea4
commit
9b18159e2f
@ -0,0 +1,22 @@
|
||||
package eu.dnetlib.uoamonitorservice.configuration;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ConfigurationProperties("monitorservice.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