|
@@ -28,6 +28,12 @@ public class MicroServicesConf {
|
|
|
@Value("#{sys.floorMicroServiceIp ?: '10.10.0.30'}")
|
|
@Value("#{sys.floorMicroServiceIp ?: '10.10.0.30'}")
|
|
|
private String floorMicroServiceIp;
|
|
private String floorMicroServiceIp;
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * profile
|
|
|
|
|
+ */
|
|
|
|
|
+ @Value("#{sys.profile}")
|
|
|
|
|
+ private String profile;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 轮播
|
|
* 轮播
|
|
|
*/
|
|
*/
|
|
@@ -71,7 +77,11 @@ public class MicroServicesConf {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public String getRequestUrlForNews(String requestUrl) {
|
|
public String getRequestUrlForNews(String requestUrl) {
|
|
|
- return String.format("http://%s%s", this.newsMicroServiceIp, requestUrl);
|
|
|
|
|
|
|
+ if ("prod".equals(profile)){
|
|
|
|
|
+ return String.format("http://%s%s", this.newsMicroServiceIp, requestUrl);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ return String.format("http://%s:%d%s", this.microServiceIp, 20210, requestUrl);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public String getRequestUrlForFloor(int port, String requestUrl) {
|
|
public String getRequestUrlForFloor(int port, String requestUrl) {
|