Commit 649c18f8 by Nepxion

重构类结构

parent ed132fe2
...@@ -19,18 +19,9 @@ import org.apache.commons.lang3.builder.ToStringStyle; ...@@ -19,18 +19,9 @@ import org.apache.commons.lang3.builder.ToStringStyle;
public class ResultEntity implements Serializable { public class ResultEntity implements Serializable {
private static final long serialVersionUID = -3322655604556025836L; private static final long serialVersionUID = -3322655604556025836L;
private String serviceId;
private String url; private String url;
private String result; private String result;
public String getServiceId() {
return serviceId;
}
public void setServiceId(String serviceId) {
this.serviceId = serviceId;
}
public String getUrl() { public String getUrl() {
return url; return url;
} }
......
...@@ -46,7 +46,6 @@ public abstract class AbstractRestInvoker { ...@@ -46,7 +46,6 @@ public abstract class AbstractRestInvoker {
List<ResultEntity> resultEntityList = new ArrayList<ResultEntity>(); List<ResultEntity> resultEntityList = new ArrayList<ResultEntity>();
for (ServiceInstance serviceInstance : serviceInstances) { for (ServiceInstance serviceInstance : serviceInstances) {
String serviceId = serviceInstance.getServiceId().toLowerCase();
String host = serviceInstance.getHost(); String host = serviceInstance.getHost();
int port = serviceInstance.getPort(); int port = serviceInstance.getPort();
String url = getUrl(host, port); String url = getUrl(host, port);
...@@ -65,7 +64,6 @@ public abstract class AbstractRestInvoker { ...@@ -65,7 +64,6 @@ public abstract class AbstractRestInvoker {
} }
ResultEntity resultEntity = new ResultEntity(); ResultEntity resultEntity = new ResultEntity();
resultEntity.setServiceId(serviceId);
resultEntity.setUrl(url); resultEntity.setUrl(url);
resultEntity.setResult(result); resultEntity.setResult(result);
......
...@@ -51,17 +51,9 @@ ...@@ -51,17 +51,9 @@
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<!-- <artifactId>spring-cloud-starter-consul-discovery</artifactId> -->
<!-- <artifactId>spring-cloud-starter-zookeeper-discovery</artifactId> -->
</dependency> </dependency>
<!-- <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
</dependency> -->
<!-- <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-zookeeper-discovery</artifactId>
</dependency> -->
</dependencies> </dependencies>
<build> <build>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment