|
|
@@ -24,6 +24,8 @@ public class EnvCommonService {
|
|
|
|
|
|
public static String DISTRIBUTE_DEFAULT_URL_PREFIX;
|
|
|
|
|
|
+ private static String port;
|
|
|
+
|
|
|
@Value(value = "${spring.profiles.active}")
|
|
|
private String env;
|
|
|
|
|
|
@@ -31,15 +33,16 @@ public class EnvCommonService {
|
|
|
private String domain;
|
|
|
|
|
|
public String getHost() {
|
|
|
+ port = EnvCommonService.active_prd.equals(getEnv()) ? "8081" : "8083";
|
|
|
return domain;
|
|
|
}
|
|
|
|
|
|
public String getDomain() {
|
|
|
- return this.getHost().substring(0, this.getHost().indexOf("8081"));
|
|
|
+ return this.getHost().substring(0, this.getHost().indexOf(port));
|
|
|
}
|
|
|
|
|
|
public String getDomain2() {
|
|
|
- return this.getHost().substring(0, this.getHost().indexOf("/8081"));
|
|
|
+ return this.getHost().substring(0, this.getHost().indexOf("/"+port));
|
|
|
}
|
|
|
|
|
|
public Boolean isPrdEnv() {
|