Project

General

Profile

« Previous | Next » 

Revision 61776

[Trunk | Monitor Service]:
1. pom.xml: Updated version of "uoa-admin-tools-library" from 1.0.1 to 1.0.2, "uoa-authorization-library" from 1.0.0 to 2.0.1, "uoa-notification-service" from 1.0.0 to 1.0.2.
2. GlobalVars.java: Added field "version" (version of project in pom).
3. MonitorServiceCheckDeployController.java: Expose globalBars.version in /health_check/advanced.
4. monitorservice.properties: Added monitorservice.globalVars.version=version (initialized by pom version).

View differences:

modules/uoa-monitor-service/trunk/pom.xml
89 89
        <dependency>
90 90
            <groupId>eu.dnetlib</groupId>
91 91
            <artifactId>uoa-admin-tools-library</artifactId>
92
            <version>1.0.1</version>
92
<!--            <version>1.0.1</version>-->
93
            <version>1.0.2</version>
93 94
        </dependency>
94 95
        <dependency>
95 96
            <groupId>eu.dnetlib</groupId>
96 97
            <artifactId>uoa-authorization-library</artifactId>
97
            <version>1.0.0</version>
98
            <version>2.0.1</version>
98 99
        </dependency>
99 100
        <dependency>
100 101
            <groupId>eu.dnetlib</groupId>
101 102
            <artifactId>uoa-notification-service</artifactId>
102
            <version>1.0.0</version>
103
            <version>1.0.2</version>
103 104
        </dependency>
104 105
        <dependency>
105 106
            <groupId>org.springframework.boot</groupId>
modules/uoa-monitor-service/trunk/src/main/java/eu/dnetlib/uoamonitorservice/configuration/GlobalVars.java
8 8
public class GlobalVars {
9 9
    public static Date date = new Date();
10 10
    private Date buildDate;
11
    private String version;
11 12

  
12 13
    public String getBuildDate() {
13 14
        if(buildDate == null) {
......
19 20
    public void setBuildDate(Date buildDate) {
20 21
        this.buildDate = buildDate;
21 22
    }
23

  
24
    public String getVersion() {
25
        return version;
26
    }
27

  
28
    public void setVersion(String version) {
29
        this.version = version;
30
    }
22 31
}
modules/uoa-monitor-service/trunk/src/main/java/eu/dnetlib/uoamonitorservice/controllers/MonitorServiceCheckDeployController.java
66 66
        if(globalVars.getBuildDate() != null) {
67 67
            response.put("Date of build", globalVars.getBuildDate());
68 68
        }
69
        if(globalVars.getVersion() != null) {
70
            response.put("Version", globalVars.getVersion());
71
        }
69 72

  
70 73
        return response;
71 74
    }
modules/uoa-monitor-service/trunk/src/main/resources/monitorservice.properties
9 9
monitorservice.mongodb.port=27017
10 10
monitorservice.mongodb.database=openaire_monitor3
11 11
monitorservice.globalVars.buildDate=@timestamp@
12
monitorservice.globalVars.version=@version@
12 13

  
13 14
#beta
14 15
#monitorservice.userInfoUrl =  https://beta.services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=

Also available in: Unified diff