AppProperties.java
1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.bsth.util;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* @author Hill
*/
@Component
public class AppProperties {
private static String scheduleDataUrl;
private static String scheduleSecret;
private static String gpsDataUrl;
private static int cacheDays;
public static String getScheduleDataUrl() {
return scheduleDataUrl;
}
@Value("${http.control.service_data_url}")
public void setScheduleDataUrl(String scheduleDataUrl) {
AppProperties.scheduleDataUrl = scheduleDataUrl;
}
public static String getScheduleSecret() {
return scheduleSecret;
}
@Value("${http.control.secret.key}")
public void setScheduleSecret(String scheduleSecret) {
AppProperties.scheduleSecret = scheduleSecret;
}
public static String getGpsDataUrl() {
return gpsDataUrl;
}
@Value("${http.gps.real.url}")
public void setGpsDataUrl(String gpsDataUrl) {
AppProperties.gpsDataUrl = gpsDataUrl;
}
public static int getCacheDays() {
return cacheDays;
}
@Value("${cache.days}")
public void setCacheDays(int cacheDays) {
AppProperties.cacheDays = cacheDays;
}
}