添加拼接https请求url的支持

This commit is contained in:
wangkang
2017-07-29 10:18:34 +08:00
parent 93556b38f4
commit 1ccb9d96c5
3 changed files with 29 additions and 1 deletions
@@ -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
*