mirror of
https://gitee.com/wangkang/udf.git
synced 2026-10-30 10:33:45 +00:00
添加拼接https请求url的支持
This commit is contained in:
@@ -44,6 +44,11 @@ public class Constant {
|
||||
*/
|
||||
public static final String HTTP = "http://";
|
||||
|
||||
/**
|
||||
* 描述 : https头
|
||||
*/
|
||||
public static final String HTTPS = "https://";
|
||||
|
||||
/**
|
||||
* 描述 : 私有化构造函数
|
||||
*
|
||||
|
||||
@@ -129,7 +129,7 @@ public class Rms {
|
||||
throw new PermissionException("no access to this servoceCode : " + serviceCode);
|
||||
}
|
||||
}
|
||||
StringBuilder url = new StringBuilder(Constant.HTTP);
|
||||
StringBuilder url = new StringBuilder(pathMate.getIsHttps() ? Constant.HTTPS : Constant.HTTP);
|
||||
url.append(rmsProperties.getService().get(pathMate.getApplicationName()));
|
||||
url.append(pathMate.getUri());
|
||||
return url.toString();
|
||||
|
||||
@@ -29,6 +29,29 @@ public class PathMate {
|
||||
*/
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 描述 : 是否HTTPS
|
||||
*/
|
||||
private Boolean isHttps = false;
|
||||
|
||||
/**
|
||||
* 描述 : 获取isHttps
|
||||
*
|
||||
* @return the isHttps
|
||||
*/
|
||||
public Boolean getIsHttps() {
|
||||
return isHttps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 设置isHttps
|
||||
*
|
||||
* @param isHttps the isHttps to set
|
||||
*/
|
||||
public void setIsHttps(Boolean isHttps) {
|
||||
this.isHttps = isHttps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 描述 : 获取applicationName
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user