You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

108 lines
3.1 KiB

package com.fr.plugin;
import com.fr.config.*;
import com.fr.config.holder.Conf;
import com.fr.config.holder.factory.Holders;
@Visualization(category = "单点配置")
public class FLConfig extends DefaultConfiguration {
private static volatile FLConfig config = null;
@Identifier(value = "valAddr", name = "接口地址", description = "接口地址", status = Status.SHOW)
private Conf<String> valAddr = Holders.simple("");
@Identifier(value = "loginClientSecret", name = "secret", description = "Secret", status = Status.SHOW)
private Conf<String> loginClientSecret = Holders.simple("");
@Identifier(value = "threeDdKey", name = "3dsKey", description = "3dsKey", status = Status.SHOW)
private Conf<String> threeDdKey = Holders.simple("xxx");
@Identifier(value = "frUrl", name = "当前fr系统地址", description = "", status = Status.SHOW)
private Conf<String> frUrl = Holders.simple("http://localhost:8075/webroot/decision");
@Identifier(value = "method", name = "单点请求方式", description = "单点请求方式", status = Status.SHOW)
private Conf<String> method = Holders.simple("");
public static FLConfig getInstance() {
if (config == null) {
config = ConfigContext.getConfigInstance(FLConfig.class);
}
return config;
}
/*
public String getService() {
return service.get();
}
public void setService(String service) {
this.service.set(service);
}*/
public String getFrUrl() {
return frUrl.get();
}
public void setFrUrl(String frUrl) {
this.frUrl.set(frUrl);
}
public String getLoginClientSecret() {
return loginClientSecret.get();
}
public String getThreeDdKey() {
return threeDdKey.get();
}
public void setThreeDdKey(String threeDdKey) {
this.threeDdKey.set(threeDdKey);
}
public String getMethod() {
return method.get();
}
public void setMethod(String method) {
this.method.set(method);
}
public void setLoginClientSecret(String loginClientSecret) {
this.loginClientSecret.set(loginClientSecret);
}
/* public String getAppid() {
return appid.get();
}
public void setAppid(String appid) {
this.appid.set(appid);
}*/
public String getValAddr() {
return valAddr.get();
}
public void setValAddr(String valAddr) {
this.valAddr.set(valAddr);
}
/* public String getSysCode() {
return syscode.get();
}
public void setSyscode(String syscode) {
this.syscode.set(syscode);
}*/
@Override
public Object clone() throws CloneNotSupportedException {
FLConfig cloned = (FLConfig) super.clone();
cloned.valAddr = (Conf<String>) valAddr.clone();
// cloned.service = (Conf<String>) service.clone();
// cloned.appid = (Conf<String>) appid.clone();
cloned.loginClientSecret = (Conf<String>) loginClientSecret.clone();
cloned.frUrl = (Conf<String>) frUrl.clone();
// cloned.syscode = (Conf<String>) syscode.clone();
return cloned;
}
}