Commit 4d699415 by Gregor Zurowski

Remove Lombok from spring-cloud-netflix-eureka-server module

parent 0d19a55d
......@@ -97,13 +97,6 @@
<artifactId>xstream</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<!-- Only needed at compile time -->
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
......
......@@ -16,8 +16,9 @@
package org.springframework.cloud.netflix.eureka.server;
import lombok.Data;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
......@@ -26,7 +27,6 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
* @author Dave Syer
*/
@ConfigurationProperties("eureka.dashboard")
@Data
public class EurekaDashboardProperties {
/**
......@@ -39,4 +39,35 @@ public class EurekaDashboardProperties {
*/
private boolean enabled = true;
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public boolean equals(Object o) {
return EqualsBuilder.reflectionEquals(this, o);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}
......@@ -16,16 +16,13 @@
package org.springframework.cloud.netflix.eureka.server.event;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent;
import java.util.Objects;
/**
* @author Spencer Gibb
*/
@Data
@EqualsAndHashCode(callSuper = false)
@SuppressWarnings("serial")
public class EurekaInstanceCanceledEvent extends ApplicationEvent {
......@@ -43,4 +40,56 @@ public class EurekaInstanceCanceledEvent extends ApplicationEvent {
this.replication = replication;
}
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public String getServerId() {
return serverId;
}
public void setServerId(String serverId) {
this.serverId = serverId;
}
public boolean isReplication() {
return replication;
}
public void setReplication(boolean replication) {
this.replication = replication;
}
@Override
public boolean equals(Object o) {
// @formatter:off
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EurekaInstanceCanceledEvent that = (EurekaInstanceCanceledEvent) o;
return Objects.equals(appName, that.appName) &&
Objects.equals(serverId, that.serverId) &&
replication == replication;
// @formatter:on
}
@Override
public int hashCode() {
return Objects.hash(appName, serverId, replication);
}
@Override
public String toString() {
// @formatter:off
return new StringBuilder("EurekaInstanceCanceledEvent{")
.append("appName='").append(appName).append("', ")
.append("serverId='").append(serverId).append("', ")
.append("replication=").append(replication).append("}")
.toString();
// @formatter:on
}
}
......@@ -16,18 +16,15 @@
package org.springframework.cloud.netflix.eureka.server.event;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent;
import com.netflix.appinfo.InstanceInfo;
import java.util.Objects;
/**
* @author Spencer Gibb
*/
@Data
@EqualsAndHashCode(callSuper = false)
@SuppressWarnings("serial")
public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
......@@ -45,4 +42,55 @@ public class EurekaInstanceRegisteredEvent extends ApplicationEvent {
this.replication = replication;
}
public InstanceInfo getInstanceInfo() {
return instanceInfo;
}
public void setInstanceInfo(InstanceInfo instanceInfo) {
this.instanceInfo = instanceInfo;
}
public int getLeaseDuration() {
return leaseDuration;
}
public void setLeaseDuration(int leaseDuration) {
this.leaseDuration = leaseDuration;
}
public boolean isReplication() {
return replication;
}
public void setReplication(boolean replication) {
this.replication = replication;
}
@Override
public boolean equals(Object o) {
// @formatter:off
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EurekaInstanceRegisteredEvent that = (EurekaInstanceRegisteredEvent) o;
return Objects.equals(instanceInfo, that.instanceInfo) &&
leaseDuration == leaseDuration &&
replication == replication;
// @formatter:on
}
@Override
public int hashCode() {
return Objects.hash(instanceInfo, leaseDuration, replication);
}
@Override
public String toString() {
// @formatter:off
return new StringBuilder("EurekaInstanceRegisteredEvent{")
.append("instanceInfo=").append(instanceInfo).append(", ")
.append("leaseDuration=").append(leaseDuration).append(", ")
.append("replication=").append(replication).append("}")
.toString();
// @formatter:on
}
}
......@@ -16,18 +16,15 @@
package org.springframework.cloud.netflix.eureka.server.event;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.context.ApplicationEvent;
import com.netflix.appinfo.InstanceInfo;
import java.util.Objects;
/**
* @author Spencer Gibb
*/
@Data
@EqualsAndHashCode(callSuper = false)
@SuppressWarnings("serial")
public class EurekaInstanceRenewedEvent extends ApplicationEvent {
......@@ -48,4 +45,63 @@ public class EurekaInstanceRenewedEvent extends ApplicationEvent {
this.replication = replication;
}
public String getAppName() {
return appName;
}
public void setAppName(String appName) {
this.appName = appName;
}
public String getServerId() {
return serverId;
}
public void setServerId(String serverId) {
this.serverId = serverId;
}
public InstanceInfo getInstanceInfo() {
return instanceInfo;
}
public void setInstanceInfo(InstanceInfo instanceInfo) {
this.instanceInfo = instanceInfo;
}
public boolean isReplication() {
return replication;
}
public void setReplication(boolean replication) {
this.replication = replication;
}
@Override
public boolean equals(Object o) {
// @formatter:off
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
EurekaInstanceRenewedEvent that = (EurekaInstanceRenewedEvent) o;
return Objects.equals(appName, that.appName) &&
Objects.equals(serverId, that.serverId) &&
Objects.equals(instanceInfo, that.instanceInfo) &&
replication == that.replication;
// @formatter:on
}
@Override
public int hashCode() {
return Objects.hash(appName, serverId, instanceInfo, replication);
}
@Override
public String toString() {
// @formatter:off
return "EurekaInstanceRenewedEvent{" + "appName='" + appName + '\''
+ ", serverId='" + serverId + '\'' + ", instanceInfo=" + instanceInfo
+ ", replication=" + replication + '}';
// @formatter:on
}
}
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