|
@@ -22,6 +22,18 @@ public class MicroServicesConf {
|
|
|
@Value("#{sys.newsMicroServiceIp ?: 'news.usoftchina.com'}")
|
|
@Value("#{sys.newsMicroServiceIp ?: 'news.usoftchina.com'}")
|
|
|
private String newsMicroServiceIp;
|
|
private String newsMicroServiceIp;
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * floor
|
|
|
|
|
+ */
|
|
|
|
|
+ @Value("#{sys.floorMicroServiceIp ?: '10.10.0.30'}")
|
|
|
|
|
+ private String floorMicroServiceIp;
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 轮播
|
|
|
|
|
+ */
|
|
|
|
|
+ @Value("#{sys.carouselMicroServiceIp ?: '10.10.0.188'}")
|
|
|
|
|
+ private String carouselMicroServiceIp;
|
|
|
|
|
+
|
|
|
public String getMicroServiceIp() {
|
|
public String getMicroServiceIp() {
|
|
|
return microServiceIp;
|
|
return microServiceIp;
|
|
|
}
|
|
}
|
|
@@ -38,6 +50,22 @@ public class MicroServicesConf {
|
|
|
this.newsMicroServiceIp = newsMicroServiceIp;
|
|
this.newsMicroServiceIp = newsMicroServiceIp;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public String getFloorMicroServiceIp() {
|
|
|
|
|
+ return floorMicroServiceIp;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public void setFloorMicroServiceIp(String floorMicroServiceIp) {
|
|
|
|
|
+ this.floorMicroServiceIp = floorMicroServiceIp;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public String getCarouselMicroServiceIp() {
|
|
|
|
|
+ return carouselMicroServiceIp;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public void setCarouselMicroServiceIp(String carouselMicroServiceIp) {
|
|
|
|
|
+ this.carouselMicroServiceIp = carouselMicroServiceIp;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public String getRequestUrl(int port, String requestUrl) {
|
|
public String getRequestUrl(int port, String requestUrl) {
|
|
|
return String.format("http://%s:%d%s", this.microServiceIp, port, requestUrl);
|
|
return String.format("http://%s:%d%s", this.microServiceIp, port, requestUrl);
|
|
|
}
|
|
}
|
|
@@ -46,6 +74,14 @@ public class MicroServicesConf {
|
|
|
return String.format("http://%s%s", this.newsMicroServiceIp, requestUrl);
|
|
return String.format("http://%s%s", this.newsMicroServiceIp, requestUrl);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public String getRequestUrlForFloor(int port, String requestUrl) {
|
|
|
|
|
+ return String.format("http://%s:%d%s", this.floorMicroServiceIp,port, requestUrl);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public String getRequestUrlForCarousel(int port, String requestUrl) {
|
|
|
|
|
+ return String.format("http://%s:%d%s", this.carouselMicroServiceIp,port, requestUrl);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public String getRequestUrl(int port, String requestUrl, PageParams pageable) {
|
|
public String getRequestUrl(int port, String requestUrl, PageParams pageable) {
|
|
|
return String.format("http://%s:%d%s%s", this.microServiceIp, port, requestUrl, "&count=" + pageable.getCount() + "&page=" + pageable.getPage() + "&filter=" + pageable.getFilter());
|
|
return String.format("http://%s:%d%s%s", this.microServiceIp, port, requestUrl, "&count=" + pageable.getCount() + "&page=" + pageable.getPage() + "&filter=" + pageable.getFilter());
|
|
|
}
|
|
}
|