package com.fr.plugin; import com.fr.config.*; import com.fr.config.holder.Conf; import com.fr.config.holder.factory.Holders; @Visualization(category = "xx单点配置") public class MTConfig extends DefaultConfiguration { private static volatile MTConfig config = null; public static MTConfig getInstance() { if (config == null) { config = ConfigContext.getConfigInstance(MTConfig.class); } return config; } @Identifier(value = "clientId", name = "clientId", description = "描述", status = Status.SHOW) private Conf clientId = Holders.simple(""); @Identifier(value = "clientSecret", name = "clientSecret", description = "描述", status = Status.SHOW) private Conf clientSecret = Holders.simple(""); @Identifier(value = "notExistUrl", name = "用户不存在调整地址", description = "用户不存在调整地址URL", status = Status.SHOW) private Conf notExistUrl = Holders.simple("https://xx/bi/has-error?message=%22%E7%94%A8%E6%88%B7%E4%B8%8D%E5%AD%98%E5%9C%A8%22"); @Identifier(value = "apiUrl", name = "接口地址", description = "描述", status = Status.SHOW) private Conf apiUrl = Holders.simple(""); @Identifier(value = "frUrl", name = "fr地址", description = "描述", status = Status.SHOW) private Conf frUrl = Holders.simple("http://localhost:8080/webroot/decision/"); public String getNotExistUrl() { return notExistUrl.get(); } public void setNotExistUrl( String notExistUrl) { this.notExistUrl .set(notExistUrl); } public String getClientId() { return clientId.get(); } public void setClientId(String clientId) { this.clientId.set(clientId); } public String getClientSecret() { return clientSecret.get(); } public void setClientSecret(String clientSecret) { this.clientSecret.set(clientSecret); } public String getApiUrl() { return apiUrl.get(); } public void setApiUrl(String apiUrl) { this.apiUrl.set(apiUrl); } public String getFrUrl() { return frUrl.get(); } public void setFrUrl(String frUrl) { this.frUrl.set(frUrl); } @Override public Object clone() throws CloneNotSupportedException { MTConfig cloned = (MTConfig) super.clone(); cloned.clientId = (Conf) this.clientId.clone(); cloned.clientSecret = (Conf) this.clientSecret.clone(); cloned.apiUrl = (Conf) this.apiUrl.clone(); cloned.frUrl = (Conf) this.frUrl.clone(); cloned.notExistUrl = (Conf) this.notExistUrl.clone(); return cloned; } }