AppProperties.java 1.07 KB
package com.bsth.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author Hill
 */
@Component
public class AppProperties {

    private int cacheDays;

    private String controlUrl;

    private String secretKey;

    private String gpsUrl;

    public int getCacheDays() {
        return cacheDays;
    }

    @Value("${cache.days}")
    public void setCacheDays(int cacheDays) {
        this.cacheDays = cacheDays;
    }

    public String getControlUrl() {
        return controlUrl;
    }

    @Value("${http.control.service_data_url}")
    public void setControlUrl(String controlUrl) {
        this.controlUrl = controlUrl;
    }

    public String getSecretKey() {
        return secretKey;
    }

    @Value("${http.control.secret.key}")
    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getGpsUrl() {
        return gpsUrl;
    }

    @Value("${http.gps.real.url}")
    public void setGpsUrl(String gpsUrl) {
        this.gpsUrl = gpsUrl;
    }
}