diff --git a/README.adoc b/README.adoc index a8beb65d..01bd8126 100644 --- a/README.adoc +++ b/README.adoc @@ -114,38 +114,14 @@ following command: The generated eclipse projects can be imported by selecting `import existing projects` from the `file` menu. - - -==== Adding Project Lombok Agent - -Spring Cloud uses http://projectlombok.org/features/index.html[Project Lombok] -to generate getters and setters etc. Compiling from the command line this -shouldn't cause any problems, but in an IDE you need to add an agent -to the JVM. Full instructions can be found in the Lombok website. The -sign that you need to do this is a lot of compiler errors to do with -missing methods and fields, e.g. - -[indent=0] ----- -The method getInitialStatus() is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 120 Java Problem -The method getInitialStatus() is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 121 Java Problem -The method setNonSecurePort(int) is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 112 Java Problem -The type EurekaInstanceConfigBean.IdentifyingDataCenterInfo must implement the inherited abstract method DataCenterInfo.getName() EurekaInstanceConfigBean.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 131 Java Problem -The method getId() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 60 Java Problem -The method getLocation() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 55 Java Problem ----- - ==== Importing into Intellij -Spring Cloud projects use annotation processing, particularly Lombok, which requires configuration -or you will encounter compile problems. It also needs a specific version of maven and a profile -enabled. Intellij 14.1+ requires some configuration to ensure these are setup properly. +Spring Cloud projects need a specific version of Maven and a profile enabled. +Intellij 14.1+ requires some configuration to ensure these are setup properly. - 1. Click Preferences, Plugins. *Ensure Lombok is installed* - 2. Click New, Project from Existing Sources, choose your spring-cloud project directory - 3. Choose Maven, and select Environment Settings. *Ensure you are using Maven 3.3.3* - 4. In the next screen, *Select the profile `spring`* click Next until Finish. - 5. Click Preferences, "Build, Execution, Deployment", Compiler, Annotation Processors. *Click Enable Annotation Processing* - 6. Click Build, Rebuild Project, and you are ready to go! + 1. Click New, Project from Existing Sources, choose your spring-cloud project directory + 2. Choose Maven, and select Environment Settings. *Ensure you are using Maven 3.3.3* + 3. In the next screen, *Select the profile `spring`* click Next until Finish. + 4. Click Build, Rebuild Project, and you are ready to go! ==== Importing into other IDEs Maven is well supported by most Java IDEs. Refer to you vendor documentation. diff --git a/docs/pom.xml b/docs/pom.xml index a48edca0..43303564 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.cloud @@ -16,14 +16,14 @@ ${basedir}/.. 1.0.x,1.1.x,1.2.x,1.3.x,2.0.x - + - - maven-deploy-plugin - - true - - + + maven-deploy-plugin + + true + + diff --git a/docs/src/main/asciidoc/README.adoc b/docs/src/main/asciidoc/README.adoc index 2d490236..6e0d6947 100644 --- a/docs/src/main/asciidoc/README.adoc +++ b/docs/src/main/asciidoc/README.adoc @@ -20,8 +20,6 @@ include::intro.adoc[] include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/building-jdk8.adoc[] -include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/building-lombok.adoc[] - == Contributing include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing.adoc[] diff --git a/pom.xml b/pom.xml index 2c570317..f490c564 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ netflix ${basedir} - 4.0.27.Final + 4.0.27.Final 2.7.3 2.0.0.BUILD-SNAPSHOT 2.0.0.BUILD-SNAPSHOT @@ -101,8 +101,8 @@ org.springframework.cloud spring-cloud-stream-dependencies ${spring-cloud-stream.version} - pom - import + pom + import io.netty diff --git a/spring-cloud-netflix-core/pom.xml b/spring-cloud-netflix-core/pom.xml index d4e3ae1c..6532a4e3 100644 --- a/spring-cloud-netflix-core/pom.xml +++ b/spring-cloud-netflix-core/pom.xml @@ -186,13 +186,6 @@ okhttp true - - org.projectlombok - lombok - - compile - true - org.springframework.boot spring-boot-starter-test diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientFactoryBean.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientFactoryBean.java index 774483af..d2c5a947 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientFactoryBean.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientFactoryBean.java @@ -17,6 +17,7 @@ package org.springframework.cloud.netflix.feign; import java.util.Map; +import java.util.Objects; import org.springframework.beans.BeanUtils; import org.springframework.beans.BeansException; @@ -40,16 +41,13 @@ import feign.Target.HardCodedTarget; import feign.codec.Decoder; import feign.codec.Encoder; import feign.codec.ErrorDecoder; -import lombok.Data; -import lombok.EqualsAndHashCode; /** * @author Spencer Gibb * @author Venil Noronha * @author Eko Kurniawan Khannedy + * @author Gregor Zurowski */ -@Data -@EqualsAndHashCode(callSuper = false) class FeignClientFactoryBean implements FactoryBean, InitializingBean, ApplicationContextAware { /*********************************** @@ -275,4 +273,99 @@ class FeignClientFactoryBean implements FactoryBean, InitializingBean, return true; } + public Class getType() { + return type; + } + + public void setType(Class type) { + this.type = type; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public boolean isDecode404() { + return decode404; + } + + public void setDecode404(boolean decode404) { + this.decode404 = decode404; + } + + public ApplicationContext getApplicationContext() { + return applicationContext; + } + + public Class getFallback() { + return fallback; + } + + public void setFallback(Class fallback) { + this.fallback = fallback; + } + + public Class getFallbackFactory() { + return fallbackFactory; + } + + public void setFallbackFactory(Class fallbackFactory) { + this.fallbackFactory = fallbackFactory; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FeignClientFactoryBean that = (FeignClientFactoryBean) o; + return Objects.equals(applicationContext, that.applicationContext) && + decode404 == that.decode404 && + Objects.equals(fallback, that.fallback) && + Objects.equals(fallbackFactory, that.fallbackFactory) && + Objects.equals(name, that.name) && + Objects.equals(path, that.path) && + Objects.equals(type, that.type) && + Objects.equals(url, that.url); + } + + @Override + public int hashCode() { + return Objects.hash(applicationContext, decode404, fallback, fallbackFactory, + name, path, type, url); + } + + @Override + public String toString() { + return new StringBuilder("FeignClientFactoryBean{") + .append("type=").append(type).append(", ") + .append("name='").append(name).append("', ") + .append("url='").append(url).append("', ") + .append("path='").append(path).append("', ") + .append("decode404=").append(decode404).append(", ") + .append("applicationContext=").append(applicationContext).append(", ") + .append("fallback=").append(fallback).append(", ") + .append("fallbackFactory=").append(fallbackFactory) + .append("}").toString(); + } + } diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientProperties.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientProperties.java index bdb51958..38a20af0 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientProperties.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientProperties.java @@ -19,7 +19,6 @@ import feign.Logger; import feign.RequestInterceptor; import feign.Retryer; import feign.codec.ErrorDecoder; -import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import java.util.HashMap; diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientSpecification.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientSpecification.java index dd93348a..fdde09df 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientSpecification.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/FeignClientSpecification.java @@ -18,20 +18,62 @@ package org.springframework.cloud.netflix.feign; import org.springframework.cloud.context.named.NamedContextFactory; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; +import java.util.Arrays; +import java.util.Objects; /** * @author Dave Syer + * @author Gregor Zurowski */ -@Data -@AllArgsConstructor -@NoArgsConstructor class FeignClientSpecification implements NamedContextFactory.Specification { private String name; private Class[] configuration; + public FeignClientSpecification() {} + + public FeignClientSpecification(String name, Class[] configuration) { + this.name = name; + this.configuration = configuration; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Class[] getConfiguration() { + return configuration; + } + + public void setConfiguration(Class[] configuration) { + this.configuration = configuration; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FeignClientSpecification that = (FeignClientSpecification) o; + return Objects.equals(name, that.name) && + Arrays.equals(configuration, that.configuration); + } + + @Override + public int hashCode() { + return Objects.hash(name, configuration); + } + + @Override + public String toString() { + return new StringBuilder("FeignClientSpecification{") + .append("name='").append(name).append("', ") + .append("configuration=").append(Arrays.toString(configuration)) + .append("}").toString(); + } + } diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/BaseRequestInterceptor.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/BaseRequestInterceptor.java index c374e9a8..595ab4c3 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/BaseRequestInterceptor.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/BaseRequestInterceptor.java @@ -18,8 +18,6 @@ package org.springframework.cloud.netflix.feign.encoding; import feign.RequestInterceptor; import feign.RequestTemplate; -import lombok.AccessLevel; -import lombok.Getter; import org.springframework.util.Assert; /** @@ -32,7 +30,6 @@ public abstract class BaseRequestInterceptor implements RequestInterceptor { /** * The encoding properties. */ - @Getter(AccessLevel.PROTECTED) private final FeignClientEncodingProperties properties; /** @@ -58,4 +55,9 @@ public abstract class BaseRequestInterceptor implements RequestInterceptor { requestTemplate.header(name, values); } } + + protected FeignClientEncodingProperties getProperties() { + return properties; + } + } diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/FeignClientEncodingProperties.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/FeignClientEncodingProperties.java index 7635002f..b98499a4 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/FeignClientEncodingProperties.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/feign/encoding/FeignClientEncodingProperties.java @@ -16,15 +16,16 @@ package org.springframework.cloud.netflix.feign.encoding; -import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; +import java.util.Arrays; +import java.util.Objects; + /** * The Feign encoding properties. * * @author Jakub Narloch */ -@Data @ConfigurationProperties("feign.compression.request") public class FeignClientEncodingProperties { @@ -37,4 +38,43 @@ public class FeignClientEncodingProperties { * The minimum threshold content size. */ private int minRequestSize = 2048; + + public String[] getMimeTypes() { + return mimeTypes; + } + + public void setMimeTypes(String[] mimeTypes) { + this.mimeTypes = mimeTypes; + } + + public int getMinRequestSize() { + return minRequestSize; + } + + public void setMinRequestSize(int minRequestSize) { + this.minRequestSize = minRequestSize; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + FeignClientEncodingProperties that = (FeignClientEncodingProperties) o; + return Arrays.equals(mimeTypes, that.mimeTypes) && + Objects.equals(minRequestSize, that.minRequestSize); + } + + @Override + public int hashCode() { + return Objects.hash(mimeTypes, minRequestSize); + } + + @Override + public String toString() { + return new StringBuilder("FeignClientEncodingProperties{") + .append("mimeTypes=").append(Arrays.toString(mimeTypes)).append(", ") + .append("minRequestSize=").append(minRequestSize) + .append("}").toString(); + } + } diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/hystrix/HystrixMetricsProperties.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/hystrix/HystrixMetricsProperties.java index d40b8c80..5501efd6 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/hystrix/HystrixMetricsProperties.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/hystrix/HystrixMetricsProperties.java @@ -18,12 +18,12 @@ package org.springframework.cloud.netflix.hystrix; import org.springframework.boot.context.properties.ConfigurationProperties; -import lombok.Data; +import java.util.Objects; /** * @author Venil Noronha + * @author Gregor Zurowski */ -@Data @ConfigurationProperties("hystrix.metrics") public class HystrixMetricsProperties { @@ -33,4 +33,41 @@ public class HystrixMetricsProperties { /** Interval between subsequent polling of metrics. Defaults to 2000 ms. */ private Integer pollingIntervalMs = 2000; + public boolean isEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + public Integer getPollingIntervalMs() { + return pollingIntervalMs; + } + + public void setPollingIntervalMs(Integer pollingIntervalMs) { + this.pollingIntervalMs = pollingIntervalMs; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HystrixMetricsProperties that = (HystrixMetricsProperties) o; + return enabled == that.enabled && + Objects.equals(pollingIntervalMs, that.pollingIntervalMs); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, pollingIntervalMs); + } + + @Override + public String toString() { + return new StringBuilder("HystrixMetricsProperties{") + .append("enabled=").append(enabled).append(", ") + .append("pollingIntervalMs=").append(pollingIntervalMs) + .append("}").toString(); + } } diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonClientSpecification.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonClientSpecification.java index 3187e2ba..5b3edb59 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonClientSpecification.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/RibbonClientSpecification.java @@ -18,20 +18,62 @@ package org.springframework.cloud.netflix.ribbon; import org.springframework.cloud.context.named.NamedContextFactory; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; +import java.util.Arrays; +import java.util.Objects; /** * @author Dave Syer */ -@Data -@AllArgsConstructor -@NoArgsConstructor public class RibbonClientSpecification implements NamedContextFactory.Specification { private String name; private Class[] configuration; + public RibbonClientSpecification() { + } + + public RibbonClientSpecification(String name, Class[] configuration) { + this.name = name; + this.configuration = configuration; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Class[] getConfiguration() { + return configuration; + } + + public void setConfiguration(Class[] configuration) { + this.configuration = configuration; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + RibbonClientSpecification that = (RibbonClientSpecification) o; + return Arrays.equals(configuration, that.configuration) && + Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(configuration, name); + } + + @Override + public String toString() { + return new StringBuilder("RibbonClientSpecification{") + .append("name='").append(name).append("', ") + .append("configuration=").append(Arrays.toString(configuration)) + .append("}").toString(); + } + } diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/ServerIntrospectorProperties.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/ServerIntrospectorProperties.java index e5492f78..1d038bc6 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/ServerIntrospectorProperties.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/ServerIntrospectorProperties.java @@ -16,17 +16,47 @@ package org.springframework.cloud.netflix.ribbon; -import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import java.util.Arrays; import java.util.List; +import java.util.Objects; /** * @author Rico Pahlisch + * @author Gregor Zurowski */ -@Data @ConfigurationProperties("ribbon") public class ServerIntrospectorProperties { + private List securePorts = Arrays.asList(443,8443); + + public List getSecurePorts() { + return securePorts; + } + + public void setSecurePorts(List securePorts) { + this.securePorts = securePorts; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ServerIntrospectorProperties that = (ServerIntrospectorProperties) o; + return Objects.equals(securePorts, that.securePorts); + } + + @Override + public int hashCode() { + return Objects.hash(securePorts); + } + + @Override + public String toString() { + return new StringBuilder("ServerIntrospectorProperties{") + .append("securePorts=").append(securePorts) + .append("}").toString(); + } + } diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/ZonePreferenceServerListFilter.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/ZonePreferenceServerListFilter.java index a8d758b0..d016f5f0 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/ZonePreferenceServerListFilter.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/ZonePreferenceServerListFilter.java @@ -18,9 +18,7 @@ package org.springframework.cloud.netflix.ribbon; import java.util.ArrayList; import java.util.List; - -import lombok.Data; -import lombok.EqualsAndHashCode; +import java.util.Objects; import com.netflix.client.config.IClientConfig; import com.netflix.config.ConfigurationManager; @@ -34,8 +32,6 @@ import com.netflix.loadbalancer.ZoneAffinityServerListFilter; * * @author Dave Syer */ -@Data -@EqualsAndHashCode(callSuper = false) public class ZonePreferenceServerListFilter extends ZoneAffinityServerListFilter { private String zone; @@ -66,4 +62,32 @@ public class ZonePreferenceServerListFilter extends ZoneAffinityServerListFilter return output; } + public String getZone() { + return zone; + } + + public void setZone(String zone) { + this.zone = zone; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ZonePreferenceServerListFilter that = (ZonePreferenceServerListFilter) o; + return Objects.equals(zone, that.zone); + } + + @Override + public int hashCode() { + return Objects.hash(zone); + } + + @Override + public String toString() { + return new StringBuilder("ZonePreferenceServerListFilter{") + .append("zone='").append(zone).append("'") + .append("}").toString(); + } + } diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/apache/RibbonApacheHttpRequest.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/apache/RibbonApacheHttpRequest.java index 44a8768b..cdf5befa 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/apache/RibbonApacheHttpRequest.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/apache/RibbonApacheHttpRequest.java @@ -28,12 +28,9 @@ import org.apache.http.entity.BasicHttpEntity; import org.springframework.cloud.netflix.ribbon.support.ContextAwareRequest; import org.springframework.cloud.netflix.zuul.filters.route.RibbonCommandContext; -import lombok.Getter; - /** * @author Christian Lohmann */ -@Getter public class RibbonApacheHttpRequest extends ContextAwareRequest implements Cloneable { public RibbonApacheHttpRequest(RibbonCommandContext context) { diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/okhttp/OkHttpRibbonRequest.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/okhttp/OkHttpRibbonRequest.java index fa81212d..a9c6706e 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/okhttp/OkHttpRibbonRequest.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/ribbon/okhttp/OkHttpRibbonRequest.java @@ -26,7 +26,6 @@ import java.util.List; import org.springframework.cloud.netflix.ribbon.support.ContextAwareRequest; import org.springframework.cloud.netflix.zuul.filters.route.RibbonCommandContext; -import lombok.Getter; import okhttp3.Headers; import okhttp3.HttpUrl; import okhttp3.MediaType; @@ -40,7 +39,6 @@ import okio.Source; /** * @author Spencer Gibb */ -@Getter public class OkHttpRibbonRequest extends ContextAwareRequest implements Cloneable { public OkHttpRibbonRequest(RibbonCommandContext context) { diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/Route.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/Route.java index a9e95e8d..2c327ef3 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/Route.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/Route.java @@ -17,13 +17,11 @@ package org.springframework.cloud.netflix.zuul.filters; import java.util.LinkedHashSet; +import java.util.Objects; import java.util.Set; import org.springframework.util.StringUtils; -import lombok.Data; - -@Data public class Route { public Route(String id, String path, String location, String prefix, @@ -42,7 +40,7 @@ public class Route { } } } - + public Route(String id, String path, String location, String prefix, Boolean retryable, Set ignoredHeaders, boolean prefixStripped) { this(id, path, location, prefix, retryable, ignoredHeaders); @@ -64,11 +62,115 @@ public class Route { private Set sensitiveHeaders = new LinkedHashSet<>(); private boolean customSensitiveHeaders; - + private boolean prefixStripped = true; public boolean isCustomSensitiveHeaders() { return this.customSensitiveHeaders; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getFullPath() { + return fullPath; + } + + public void setFullPath(String fullPath) { + this.fullPath = fullPath; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getLocation() { + return location; + } + + public void setLocation(String location) { + this.location = location; + } + + public String getPrefix() { + return prefix; + } + + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + public Boolean getRetryable() { + return retryable; + } + + public void setRetryable(Boolean retryable) { + this.retryable = retryable; + } + + public Set getSensitiveHeaders() { + return sensitiveHeaders; + } + + public void setSensitiveHeaders(Set sensitiveHeaders) { + this.sensitiveHeaders = sensitiveHeaders; + } + + public void setCustomSensitiveHeaders(boolean customSensitiveHeaders) { + this.customSensitiveHeaders = customSensitiveHeaders; + } + + public boolean isPrefixStripped() { + return prefixStripped; + } + + public void setPrefixStripped(boolean prefixStripped) { + this.prefixStripped = prefixStripped; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Route that = (Route) o; + return customSensitiveHeaders == that.customSensitiveHeaders && + prefixStripped == that.prefixStripped && + Objects.equals(id, that.id) && + Objects.equals(fullPath, that.fullPath) && + Objects.equals(path, that.path) && + Objects.equals(location, that.location) && + Objects.equals(prefix, that.prefix) && + Objects.equals(retryable, that.retryable) && + Objects.equals(sensitiveHeaders, that.sensitiveHeaders); + } + + @Override + public int hashCode() { + return Objects.hash(id, fullPath, path, location, prefix, retryable, + sensitiveHeaders, customSensitiveHeaders, prefixStripped); + } + + @Override + public String toString() { + return new StringBuilder("Route{") + .append("id='").append(id).append("', ") + .append("fullPath='").append(fullPath).append("', ") + .append("path='").append(path).append("', ") + .append("location='").append(location).append("', ") + .append("prefix='").append(prefix).append("', ") + .append("retryable=").append(retryable).append(", ") + .append("sensitiveHeaders=").append(sensitiveHeaders).append(", ") + .append("customSensitiveHeaders=").append(customSensitiveHeaders).append(", ") + .append("prefixStripped=").append(prefixStripped) + .append("}").toString(); + } } \ No newline at end of file diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/SimpleRouteLocator.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/SimpleRouteLocator.java index 29639c52..273f7eab 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/SimpleRouteLocator.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/SimpleRouteLocator.java @@ -23,7 +23,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.atomic.AtomicReference; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.cloud.netflix.zuul.filters.ZuulProperties.ZuulRoute; @@ -65,12 +64,9 @@ public class SimpleRouteLocator implements RouteLocator, Ordered { @Override public List getRoutes() { - if (this.routes.get() == null) { - this.routes.set(locateRoutes()); - } List values = new ArrayList<>(); - for (String url : this.routes.get().keySet()) { - ZuulRoute route = this.routes.get().get(url); + for (Entry entry : getRoutesMap().entrySet()) { + ZuulRoute route = entry.getValue(); String path = route.getPath(); values.add(getRoute(route, path)); } @@ -89,14 +85,20 @@ public class SimpleRouteLocator implements RouteLocator, Ordered { } + protected Map getRoutesMap() { + if (this.routes.get() == null) { + this.routes.set(locateRoutes()); + } + return this.routes.get(); + } + protected Route getSimpleMatchingRoute(final String path) { if (log.isDebugEnabled()) { log.debug("Finding route for path: " + path); } - if (this.routes.get() == null) { - this.routes.set(locateRoutes()); - } + // This is called for the initialization done in getRoutesMap() + getRoutesMap(); if (log.isDebugEnabled()) { log.debug("servletPath=" + this.dispatcherServletPath); @@ -116,7 +118,7 @@ public class SimpleRouteLocator implements RouteLocator, Ordered { protected ZuulRoute getZuulRoute(String adjustedPath) { if (!matchesIgnoredPatterns(adjustedPath)) { - for (Entry entry : this.routes.get().entrySet()) { + for (Entry entry : getRoutesMap().entrySet()) { String pattern = entry.getKey(); log.debug("Matching pattern:" + pattern); if (this.pathMatcher.match(pattern, adjustedPath)) { diff --git a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ZuulProperties.java b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ZuulProperties.java index d25ac04a..0de4884a 100644 --- a/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ZuulProperties.java +++ b/spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/ZuulProperties.java @@ -17,9 +17,6 @@ package org.springframework.cloud.netflix.zuul.filters; import com.netflix.hystrix.HystrixCommandProperties.ExecutionIsolationStrategy; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.util.ClassUtils; import org.springframework.util.StringUtils; @@ -32,6 +29,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Objects; import java.util.Set; import java.util.concurrent.TimeUnit; @@ -42,8 +40,8 @@ import static com.netflix.hystrix.HystrixCommandProperties.ExecutionIsolationStr * @author Dave Syer * @author Mathias Düsterhöft * @author Bilal Alp + * @author Gregor Zurowski */ -@Data @ConfigurationProperties("zuul") public class ZuulProperties { @@ -194,8 +192,6 @@ public class ZuulProperties { } } - @Data - @NoArgsConstructor public static class ZuulRoute { /** @@ -244,6 +240,8 @@ public class ZuulProperties { private boolean customSensitiveHeaders = false; + public ZuulRoute() {} + public ZuulRoute(String id, String path, String serviceId, String url, boolean stripPrefix, Boolean retryable, Set sensitiveHeaders) { this.id = id; @@ -317,11 +315,97 @@ public class ZuulProperties { return this.customSensitiveHeaders; } + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getServiceId() { + return serviceId; + } + + public void setServiceId(String serviceId) { + this.serviceId = serviceId; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + public boolean isStripPrefix() { + return stripPrefix; + } + + public void setStripPrefix(boolean stripPrefix) { + this.stripPrefix = stripPrefix; + } + + public Boolean getRetryable() { + return retryable; + } + + public void setRetryable(Boolean retryable) { + this.retryable = retryable; + } + + public Set getSensitiveHeaders() { + return sensitiveHeaders; + } + + public void setCustomSensitiveHeaders(boolean customSensitiveHeaders) { + this.customSensitiveHeaders = customSensitiveHeaders; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ZuulRoute that = (ZuulRoute) o; + return customSensitiveHeaders == that.customSensitiveHeaders && + Objects.equals(id, that.id) && + Objects.equals(path, that.path) && + Objects.equals(retryable, that.retryable) && + Objects.equals(sensitiveHeaders, that.sensitiveHeaders) && + Objects.equals(serviceId, that.serviceId) && + stripPrefix == that.stripPrefix && + Objects.equals(url, that.url); + } + + @Override + public int hashCode() { + return Objects.hash(customSensitiveHeaders, id, path, retryable, + sensitiveHeaders, serviceId, stripPrefix, url); + } + + @Override public String toString() { + return new StringBuilder("ZuulRoute{").append("id='").append(id).append("', ") + .append("path='").append(path).append("', ") + .append("serviceId='").append(serviceId).append("', ") + .append("url='").append(url).append("', ") + .append("stripPrefix=").append(stripPrefix).append(", ") + .append("retryable=").append(retryable).append(", ") + .append("sensitiveHeaders=").append(sensitiveHeaders).append(", ") + .append("customSensitiveHeaders=").append(customSensitiveHeaders).append(", ") + .append("}").toString(); + } + } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Host { /** * The maximum number of total connections the proxy can hold open to backends. @@ -347,17 +431,141 @@ public class ZuulProperties { * The time unit for timeToLive. */ private TimeUnit timeUnit = TimeUnit.MILLISECONDS; + + public Host() { + } + + public Host(int maxTotalConnections, int maxPerRouteConnections, + int socketTimeoutMillis, int connectTimeoutMillis, long timeToLive, + TimeUnit timeUnit) { + this.maxTotalConnections = maxTotalConnections; + this.maxPerRouteConnections = maxPerRouteConnections; + this.socketTimeoutMillis = socketTimeoutMillis; + this.connectTimeoutMillis = connectTimeoutMillis; + this.timeToLive = timeToLive; + this.timeUnit = timeUnit; + } + + public int getMaxTotalConnections() { + return maxTotalConnections; + } + + public void setMaxTotalConnections(int maxTotalConnections) { + this.maxTotalConnections = maxTotalConnections; + } + + public int getMaxPerRouteConnections() { + return maxPerRouteConnections; + } + + public void setMaxPerRouteConnections(int maxPerRouteConnections) { + this.maxPerRouteConnections = maxPerRouteConnections; + } + + public int getSocketTimeoutMillis() { + return socketTimeoutMillis; + } + + public void setSocketTimeoutMillis(int socketTimeoutMillis) { + this.socketTimeoutMillis = socketTimeoutMillis; + } + + public int getConnectTimeoutMillis() { + return connectTimeoutMillis; + } + + public void setConnectTimeoutMillis(int connectTimeoutMillis) { + this.connectTimeoutMillis = connectTimeoutMillis; + } + + public long getTimeToLive() { + return timeToLive; + } + + public void setTimeToLive(long timeToLive) { + this.timeToLive = timeToLive; + } + + public TimeUnit getTimeUnit() { + return timeUnit; + } + + public void setTimeUnit(TimeUnit timeUnit) { + this.timeUnit = timeUnit; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Host host = (Host) o; + return maxTotalConnections == host.maxTotalConnections && + maxPerRouteConnections == host.maxPerRouteConnections && + socketTimeoutMillis == host.socketTimeoutMillis && + connectTimeoutMillis == host.connectTimeoutMillis && + timeToLive == host.timeToLive && + timeUnit == host.timeUnit; + } + + @Override + public int hashCode() { + return Objects.hash(maxTotalConnections, maxPerRouteConnections, socketTimeoutMillis, connectTimeoutMillis, timeToLive, timeUnit); + } + + @Override + public String toString() { + final StringBuffer sb = new StringBuffer("Host{"); + sb.append("maxTotalConnections=").append(maxTotalConnections); + sb.append(", maxPerRouteConnections=").append(maxPerRouteConnections); + sb.append(", socketTimeoutMillis=").append(socketTimeoutMillis); + sb.append(", connectTimeoutMillis=").append(connectTimeoutMillis); + sb.append(", timeToLive=").append(timeToLive); + sb.append(", timeUnit=").append(timeUnit); + sb.append('}'); + return sb.toString(); + } } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class HystrixSemaphore { /** * The maximum number of total semaphores for Hystrix. */ private int maxSemaphores = 100; - + + public HystrixSemaphore() {} + + public HystrixSemaphore(int maxSemaphores) { + this.maxSemaphores = maxSemaphores; + } + + public int getMaxSemaphores() { + return maxSemaphores; + } + + public void setMaxSemaphores(int maxSemaphores) { + this.maxSemaphores = maxSemaphores; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + HystrixSemaphore that = (HystrixSemaphore) o; + return maxSemaphores == that.maxSemaphores; + } + + @Override + public int hashCode() { + return Objects.hash(maxSemaphores); + } + + @Override + public String toString() { + final StringBuffer sb = new StringBuffer("HystrixSemaphore{"); + sb.append("maxSemaphores=").append(maxSemaphores); + sb.append('}'); + return sb.toString(); + } } public static class HystrixThreadPool { @@ -404,4 +612,230 @@ public class ZuulProperties { return path; } + public String getPrefix() { + return prefix; + } + + public void setPrefix(String prefix) { + this.prefix = prefix; + } + + public boolean isStripPrefix() { + return stripPrefix; + } + + public void setStripPrefix(boolean stripPrefix) { + this.stripPrefix = stripPrefix; + } + + public Boolean getRetryable() { + return retryable; + } + + public void setRetryable(Boolean retryable) { + this.retryable = retryable; + } + + public Map getRoutes() { + return routes; + } + + public void setRoutes(Map routes) { + this.routes = routes; + } + + public boolean isAddProxyHeaders() { + return addProxyHeaders; + } + + public void setAddProxyHeaders(boolean addProxyHeaders) { + this.addProxyHeaders = addProxyHeaders; + } + + public boolean isAddHostHeader() { + return addHostHeader; + } + + public void setAddHostHeader(boolean addHostHeader) { + this.addHostHeader = addHostHeader; + } + + public Set getIgnoredServices() { + return ignoredServices; + } + + public void setIgnoredServices(Set ignoredServices) { + this.ignoredServices = ignoredServices; + } + + public Set getIgnoredPatterns() { + return ignoredPatterns; + } + + public void setIgnoredPatterns(Set ignoredPatterns) { + this.ignoredPatterns = ignoredPatterns; + } + + public boolean isIgnoreSecurityHeaders() { + return ignoreSecurityHeaders; + } + + public void setIgnoreSecurityHeaders(boolean ignoreSecurityHeaders) { + this.ignoreSecurityHeaders = ignoreSecurityHeaders; + } + + public boolean isForceOriginalQueryStringEncoding() { + return forceOriginalQueryStringEncoding; + } + + public void setForceOriginalQueryStringEncoding( + boolean forceOriginalQueryStringEncoding) { + this.forceOriginalQueryStringEncoding = forceOriginalQueryStringEncoding; + } + + public String getServletPath() { + return servletPath; + } + + public void setServletPath(String servletPath) { + this.servletPath = servletPath; + } + + public boolean isIgnoreLocalService() { + return ignoreLocalService; + } + + public void setIgnoreLocalService(boolean ignoreLocalService) { + this.ignoreLocalService = ignoreLocalService; + } + + public Host getHost() { + return host; + } + + public void setHost(Host host) { + this.host = host; + } + + public boolean isTraceRequestBody() { + return traceRequestBody; + } + + public void setTraceRequestBody(boolean traceRequestBody) { + this.traceRequestBody = traceRequestBody; + } + + public boolean isRemoveSemicolonContent() { + return removeSemicolonContent; + } + + public void setRemoveSemicolonContent(boolean removeSemicolonContent) { + this.removeSemicolonContent = removeSemicolonContent; + } + + public Set getSensitiveHeaders() { + return sensitiveHeaders; + } + + public void setSensitiveHeaders(Set sensitiveHeaders) { + this.sensitiveHeaders = sensitiveHeaders; + } + + public boolean isSslHostnameValidationEnabled() { + return sslHostnameValidationEnabled; + } + + public void setSslHostnameValidationEnabled(boolean sslHostnameValidationEnabled) { + this.sslHostnameValidationEnabled = sslHostnameValidationEnabled; + } + + public ExecutionIsolationStrategy getRibbonIsolationStrategy() { + return ribbonIsolationStrategy; + } + + public void setRibbonIsolationStrategy( + ExecutionIsolationStrategy ribbonIsolationStrategy) { + this.ribbonIsolationStrategy = ribbonIsolationStrategy; + } + + public HystrixSemaphore getSemaphore() { + return semaphore; + } + + public void setSemaphore(HystrixSemaphore semaphore) { + this.semaphore = semaphore; + } + + public HystrixThreadPool getThreadPool() { + return threadPool; + } + + public void setThreadPool(HystrixThreadPool threadPool) { + this.threadPool = threadPool; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ZuulProperties that = (ZuulProperties) o; + return addHostHeader == that.addHostHeader && + addProxyHeaders == that.addProxyHeaders && + forceOriginalQueryStringEncoding == that.forceOriginalQueryStringEncoding && + Objects.equals(host, that.host) && + Objects.equals(ignoredHeaders, that.ignoredHeaders) && + Objects.equals(ignoredPatterns, that.ignoredPatterns) && + Objects.equals(ignoredServices, that.ignoredServices) && + ignoreLocalService == that.ignoreLocalService && + ignoreSecurityHeaders == that.ignoreSecurityHeaders && + Objects.equals(prefix, that.prefix) && + removeSemicolonContent == that.removeSemicolonContent && + Objects.equals(retryable, that.retryable) && + Objects.equals(ribbonIsolationStrategy, that.ribbonIsolationStrategy) && + Objects.equals(routes, that.routes) && + Objects.equals(semaphore, that.semaphore) && + Objects.equals(sensitiveHeaders, that.sensitiveHeaders) && + Objects.equals(servletPath, that.servletPath) && + sslHostnameValidationEnabled == that.sslHostnameValidationEnabled && + stripPrefix == that.stripPrefix && + Objects.equals(threadPool, that.threadPool) && + traceRequestBody == that.traceRequestBody; + } + + @Override + public int hashCode() { + return Objects.hash(addHostHeader, addProxyHeaders, forceOriginalQueryStringEncoding, + host, ignoredHeaders, ignoredPatterns, ignoredServices, ignoreLocalService, + ignoreSecurityHeaders, prefix, removeSemicolonContent, retryable, + ribbonIsolationStrategy, routes, semaphore, sensitiveHeaders, servletPath, + sslHostnameValidationEnabled, stripPrefix, threadPool, traceRequestBody); + } + + @Override + public String toString() { + return new StringBuilder("ZuulProperties{") + .append("prefix='").append(prefix).append("', ") + .append("stripPrefix=").append(stripPrefix).append(", ") + .append("retryable=").append(retryable).append(", ") + .append("routes=").append(routes).append(", ") + .append("addProxyHeaders=").append(addProxyHeaders).append(", ") + .append("addHostHeader=").append(addHostHeader).append(", ") + .append("ignoredServices=").append(ignoredServices).append(", ") + .append("ignoredPatterns=").append(ignoredPatterns).append(", ") + .append("ignoredHeaders=").append(ignoredHeaders).append(", ") + .append("ignoreSecurityHeaders=").append(ignoreSecurityHeaders).append(", ") + .append("forceOriginalQueryStringEncoding=").append(forceOriginalQueryStringEncoding).append(", ") + .append("servletPath='").append(servletPath).append("', ") + .append("ignoreLocalService=").append(ignoreLocalService).append(", ") + .append("host=").append(host).append(", ") + .append("traceRequestBody=").append(traceRequestBody).append(", ") + .append("removeSemicolonContent=").append(removeSemicolonContent).append(", ") + .append("sensitiveHeaders=").append(sensitiveHeaders).append(", ") + .append("sslHostnameValidationEnabled=").append(sslHostnameValidationEnabled).append(", ") + .append("ribbonIsolationStrategy=").append(ribbonIsolationStrategy).append(", ") + .append("semaphore=").append(semaphore).append(", ") + .append("threadPool=").append(threadPool).append(", ") + .append("}").toString(); + } + } diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/FeignHttpClientUrlTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/FeignHttpClientUrlTests.java index eabfd678..ca897843 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/FeignHttpClientUrlTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/FeignHttpClientUrlTests.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import java.lang.reflect.Field; +import java.util.Objects; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -48,9 +49,6 @@ import feign.Client; import feign.Feign; import feign.Target; import feign.httpclient.ApacheHttpClient; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; /** * @author Spencer Gibb @@ -171,10 +169,35 @@ public class FeignHttpClientUrlTests { assertEquals("first hello didn't match", new Hello("hello world 1"), hello); } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() { + } + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hello that = (Hello) o; + return Objects.equals(message, that.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } } } diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/SpringDecoderTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/SpringDecoderTests.java index c01cebf9..87f8dcee 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/SpringDecoderTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/SpringDecoderTests.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; import org.junit.Test; import org.junit.runner.RunWith; @@ -43,10 +44,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * @author Spencer Gibb */ @@ -147,11 +144,36 @@ public class SpringDecoderTests extends FeignClientFactoryBean { assertNull("response body was not null", response.getBody()); } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() { + } + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hello that = (Hello) o; + return Objects.equals(message, that.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } } protected interface TestClient { diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/beans/FeignClientTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/beans/FeignClientTests.java index 35406a42..30f53737 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/beans/FeignClientTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/beans/FeignClientTests.java @@ -22,6 +22,7 @@ import static org.junit.Assert.assertTrue; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; import java.util.Map; +import java.util.Objects; import org.junit.Test; import org.junit.runner.RunWith; @@ -42,10 +43,6 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * @author Dave Syer */ @@ -89,11 +86,37 @@ public class FeignClientTests { } } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() { + } + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hello that = (Hello) o; + + return Objects.equals(message, that.message); + } + + @Override + public int hashCode() { + return message != null ? message.hashCode() : 0; + } } @Test diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignLoadBalancerTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignLoadBalancerTests.java index 45da333f..4e468ca3 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignLoadBalancerTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignLoadBalancerTests.java @@ -37,6 +37,12 @@ import com.netflix.client.config.IClientConfig; import com.netflix.loadbalancer.ILoadBalancer; import com.netflix.loadbalancer.Server; +import feign.Client; +import feign.Request; +import feign.RequestTemplate; +import feign.Response; +import feign.Request.Options; + import static com.netflix.client.config.CommonClientConfigKey.ConnectTimeout; import static com.netflix.client.config.CommonClientConfigKey.IsSecure; import static com.netflix.client.config.CommonClientConfigKey.MaxAutoRetries; @@ -52,13 +58,6 @@ import static org.mockito.Matchers.anyBoolean; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.when; -import feign.Client; -import feign.Request; -import feign.Request.Options; -import feign.RequestTemplate; -import feign.Response; -import lombok.SneakyThrows; - public class FeignLoadBalancerTests { @Mock @@ -89,8 +88,7 @@ public class FeignLoadBalancerTests { } @Test - @SneakyThrows - public void testUriInsecure() { + public void testUriInsecure() throws Exception { when(this.config.get(IsSecure)).thenReturn(false); this.feignLoadBalancer = new FeignLoadBalancer(this.lb, this.config, @@ -111,8 +109,7 @@ public class FeignLoadBalancerTests { } @Test - @SneakyThrows - public void testSecureUriFromClientConfig() { + public void testSecureUriFromClientConfig() throws Exception { when(this.config.get(IsSecure)).thenReturn(true); this.feignLoadBalancer = new FeignLoadBalancer(this.lb, this.config, this.inspector); @@ -123,8 +120,8 @@ public class FeignLoadBalancerTests { } @Test - @SneakyThrows - public void testInsecureUriFromInsecureClientConfigToSecureServerIntrospector() { + public void testInsecureUriFromInsecureClientConfigToSecureServerIntrospector() + throws Exception { when(this.config.get(IsSecure)).thenReturn(false); this.feignLoadBalancer = new FeignLoadBalancer(this.lb, this.config, new ServerIntrospector() { @@ -145,8 +142,7 @@ public class FeignLoadBalancerTests { } @Test - @SneakyThrows - public void testSecureUriFromClientConfigOverride() { + public void testSecureUriFromClientConfigOverride() throws Exception { this.feignLoadBalancer = new FeignLoadBalancer(this.lb, this.config, this.inspector); Server server = Mockito.mock(Server.class); @@ -158,8 +154,7 @@ public class FeignLoadBalancerTests { } @Test - @SneakyThrows - public void testRibbonRequestURLEncode() { + public void testRibbonRequestURLEncode() throws Exception { String url = "http://foo/?name=%7bcookie";//name={cookie Request request = Request.create("GET",url,new HashMap(),null,null); diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientPathTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientPathTests.java index 5bd13d0b..97d67f0c 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientPathTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientPathTests.java @@ -42,10 +42,6 @@ import org.springframework.web.bind.annotation.RestController; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerList; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * @author Venil Noronha */ @@ -158,11 +154,22 @@ public class FeignRibbonClientPathTests { hello.getMessage()); } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() {} + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } } @Configuration diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientRetryTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientRetryTests.java index 28a0ad36..95137773 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientRetryTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/ribbon/FeignRibbonClientRetryTests.java @@ -18,9 +18,6 @@ package org.springframework.cloud.netflix.feign.ribbon; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerList; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; @@ -120,11 +117,23 @@ public class FeignRibbonClientRetryTests { // maybe the assertEquals above is enough because of the bogus servers } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() { + } + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } } } diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/support/SpringEncoderTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/support/SpringEncoderTests.java index 33b11d1a..70af122d 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/support/SpringEncoderTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/support/SpringEncoderTests.java @@ -50,7 +50,6 @@ import static org.hamcrest.Matchers.nullValue; import static org.junit.Assert.assertThat; import feign.RequestTemplate; -import lombok.Data; /** * @author Spencer Gibb @@ -120,9 +119,16 @@ public class SpringEncoderTests { } } - @Data protected static class MyType { private String value; + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } } protected interface TestClient { diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/support/SpringMvcContractTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/support/SpringMvcContractTests.java index 37548645..ef04b88a 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/support/SpringMvcContractTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/support/SpringMvcContractTests.java @@ -46,9 +46,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assume.assumeTrue; import feign.MethodMetadata; -import lombok.AllArgsConstructor; -import lombok.NoArgsConstructor; -import lombok.ToString; /** * @author chadjaros @@ -527,15 +524,20 @@ public class SpringMvcContractTests { TestObject getTest(); } - @AllArgsConstructor - @NoArgsConstructor - @ToString @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE, setterVisibility = JsonAutoDetect.Visibility.NONE) public class TestObject { public String something; public Double number; + public TestObject() { + } + + public TestObject(String something, Double number) { + this.something = something; + this.number = number; + } + @Override public boolean equals(Object o) { if (this == o) { @@ -565,5 +567,13 @@ public class SpringMvcContractTests { result = 31 * result + (this.number != null ? this.number.hashCode() : 0); return result; } + + @Override + public String toString() { + return new StringBuilder("TestObject{") + .append("something='").append(something).append("', ") + .append("number=").append(number) + .append("}").toString(); + } } } diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignClientNotPrimaryTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignClientNotPrimaryTests.java index 25ae5bc2..ab7f6952 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignClientNotPrimaryTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignClientNotPrimaryTests.java @@ -45,9 +45,6 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.junit.Assert.assertNull; import feign.Logger; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; import java.util.List; @@ -134,11 +131,22 @@ public class FeignClientNotPrimaryTests { } } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() {} + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } } @Configuration diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignClientTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignClientTests.java index 76518ab2..82aa0d20 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignClientTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignClientTests.java @@ -33,6 +33,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Locale; +import java.util.Objects; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; @@ -83,9 +84,6 @@ import feign.RequestTemplate; import feign.Target; import feign.hystrix.FallbackFactory; import feign.hystrix.SetterFactory; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; import rx.Observable; import rx.Single; @@ -725,11 +723,36 @@ public class FeignClientTests { assertEquals("hellos didn't match", hellos, getHelloList()); } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() { + } + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hello that = (Hello) o; + return Objects.equals(message, that.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } } @Configuration diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignHttpClientTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignHttpClientTests.java index 27aa31b9..e3847c90 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignHttpClientTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignHttpClientTests.java @@ -52,9 +52,8 @@ import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerList; import feign.Client; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; + +import java.util.Objects; /** * @author Spencer Gibb @@ -161,18 +160,66 @@ public class FeignHttpClientTests { assertEquals("Users were different", user, new User("John Smith")); } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() {} + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hello that = (Hello) o; + return Objects.equals(message, that.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class User { private String name; + + public User() {} + + public User(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + User that = (User) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } } // Load balancer with fixed server list for "local" pointing to localhost diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignOkHttpTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignOkHttpTests.java index 1859aa02..5defc28c 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignOkHttpTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/feign/valid/FeignOkHttpTests.java @@ -53,9 +53,8 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThat; import feign.Client; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; + +import java.util.Objects; /** * @author Spencer Gibb @@ -115,7 +114,7 @@ public class FeignOkHttpTests { @RequestMapping(method = RequestMethod.PATCH, value = "/hellop") public ResponseEntity patchHello(@RequestBody Hello hello, - @RequestHeader("Content-Length") int contentLength) { + @RequestHeader("Content-Length") int contentLength) { if (contentLength <= 0) { throw new IllegalArgumentException("Invalid Content-Length "+ contentLength); } @@ -163,18 +162,68 @@ public class FeignOkHttpTests { assertEquals("Users were different", user, new User("John Smith")); } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class Hello { private String message; + + public Hello() { + } + + public Hello(String message) { + this.message = message; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Hello that = (Hello) o; + return Objects.equals(message, that.message); + } + + @Override + public int hashCode() { + return Objects.hash(message); + } } - @Data - @AllArgsConstructor - @NoArgsConstructor public static class User { private String name; + + public User() { + } + + public User(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + User that = (User) o; + return Objects.equals(name, that.name); + } + + @Override + public int hashCode() { + return Objects.hash(name); + } } // Load balancer with fixed server list for "local" pointing to localhost diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientHttpRequestFactoryTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientHttpRequestFactoryTests.java index bbcbb2f8..48070b7e 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientHttpRequestFactoryTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonClientHttpRequestFactoryTests.java @@ -52,8 +52,6 @@ import org.springframework.web.client.RestTemplate; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerList; -import lombok.SneakyThrows; - /** * @author Spencer Gibb */ @@ -128,8 +126,7 @@ public class RibbonClientHttpRequestFactoryTests { } @Test - @SneakyThrows - public void requestWithHeaderWorks() { + public void requestWithHeaderWorks() throws Exception { RequestEntity entity = RequestEntity.get(new URI("http://simple/header")) .header("X-Param", "world").build(); ResponseEntity response = this.restTemplate.exchange(entity, diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancerClientTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancerClientTests.java index 905cc6ac..fa0746ca 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancerClientTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/ribbon/RibbonLoadBalancerClientTests.java @@ -38,8 +38,6 @@ import com.netflix.loadbalancer.LoadBalancerStats; import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerStats; -import lombok.SneakyThrows; - import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertEquals; @@ -88,7 +86,7 @@ public class RibbonLoadBalancerClientTests { } @Test - public void reconstructURI() { + public void reconstructURI() throws Exception { testReconstructURI("http"); } @@ -97,8 +95,7 @@ public class RibbonLoadBalancerClientTests { testReconstructURI("https"); } - @SneakyThrows - private void testReconstructURI(String scheme) { + private void testReconstructURI(String scheme) throws Exception { RibbonServer server = getRibbonServer(); RibbonLoadBalancerClient client = getRibbonLoadBalancerClient(server); ServiceInstance serviceInstance = client.choose(server.getServiceId()); @@ -134,8 +131,7 @@ public class RibbonLoadBalancerClientTests { } @Test - @SneakyThrows - public void testReconstructUriWithSecureClientConfig() { + public void testReconstructUriWithSecureClientConfig() throws Exception { RibbonServer server = getRibbonServer(); IClientConfig config = mock(IClientConfig.class); when(config.get(CommonClientConfigKey.IsSecure)).thenReturn(true); @@ -151,19 +147,17 @@ public class RibbonLoadBalancerClientTests { } @Test - @SneakyThrows - public void testReconstructSecureUriWithoutScheme() { + public void testReconstructSecureUriWithoutScheme() throws Exception { testReconstructSchemelessUriWithoutClientConfig(getSecureRibbonServer(), "https"); } @Test - @SneakyThrows - public void testReconstructUnsecureSchemelessUri() { + public void testReconstructUnsecureSchemelessUri() throws Exception { testReconstructSchemelessUriWithoutClientConfig(getRibbonServer(), "http"); } - @SneakyThrows - public void testReconstructSchemelessUriWithoutClientConfig(RibbonServer server, String expectedScheme) { + public void testReconstructSchemelessUriWithoutClientConfig(RibbonServer server, String expectedScheme) + throws Exception { IClientConfig config = mock(IClientConfig.class); when(config.get(CommonClientConfigKey.IsSecure)).thenReturn(null); when(clientFactory.getClientConfig(server.getServiceId())).thenReturn(config); diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/SimpleRouteLocatorTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/SimpleRouteLocatorTests.java new file mode 100644 index 00000000..0ba3d486 --- /dev/null +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/SimpleRouteLocatorTests.java @@ -0,0 +1,112 @@ +/* + * Copyright 2013-2014 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.cloud.netflix.zuul.filters; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import static org.hamcrest.CoreMatchers.hasItem; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.collection.IsCollectionWithSize.hasSize; +import static org.junit.Assert.assertThat; +import org.junit.Test; +import org.springframework.cloud.netflix.zuul.filters.ZuulProperties.ZuulRoute; + +/** + * @author Tom Cawley + */ +public class SimpleRouteLocatorTests { + private ZuulProperties zuul = new ZuulProperties(); + + public SimpleRouteLocatorTests() { + } + + @Test + public void test_getRoutesDefaultRouteAcceptor() { + RouteLocator locator = new SimpleRouteLocator("/", this.zuul); + this.zuul.getRoutes().clear(); + this.zuul.getRoutes().put("foo", new ZuulRoute("/foo/**", "foo")); + + assertThat(locator.getRoutes(), hasItem(createRoute("foo", "/**", "/foo"))); + } + + @Test + public void test_getRoutesFilterRouteAcceptor() { + RouteLocator locator = new FilteringRouteLocator("/", this.zuul); + this.zuul.getRoutes().clear(); + this.zuul.getRoutes().put("foo", new ZuulRoute("/foo/**", "foo")); + this.zuul.getRoutes().put("bar", new ZuulRoute("/bar/**", "bar")); + + final List routes = locator.getRoutes(); + assertThat(routes, hasItem(createRoute("bar", "/**", "/bar"))); + assertThat(routes, hasSize(1)); + } + + @Test + public void test_getMatchingRouteFilterRouteAcceptor() { + RouteLocator locator = new FilteringRouteLocator("/", this.zuul); + this.zuul.getRoutes().clear(); + this.zuul.getRoutes().put("foo", new ZuulRoute("/foo/**", "foo")); + this.zuul.getRoutes().put("bar", new ZuulRoute("/bar/**", "bar")); + + assertThat(locator.getMatchingRoute("/foo/1"), nullValue()); + assertThat(locator.getMatchingRoute("/bar/1"), is(createRoute("bar", "/1", "/bar"))); + } + + private Route createRoute(String id, String path, String prefix) { + return new Route(id, path, id, prefix, false, null); + } + + private static class FilteringRouteLocator extends SimpleRouteLocator { + public FilteringRouteLocator(String servletPath, ZuulProperties properties) { + super(servletPath, properties); + } + + @Override + public List getRoutes() { + List values = new ArrayList<>(); + + for (Entry entry : getRoutesMap().entrySet()) { + ZuulRoute route = entry.getValue(); + if (acceptRoute(route)) { + String path = route.getPath(); + values.add(getRoute(route, path)); + } + } + return values; + } + + private boolean acceptRoute(ZuulRoute route) { + return route != null && !(route.getId().equals("foo")); + } + + protected Route getRoute(ZuulRoute route, String path) { + if (acceptRoute(route)) { + return super.getRoute(route, path); + } + return null; + } + + // For testing, expose as public so we can call getRoutesMap() directly. + @Override + public Map getRoutesMap() { + return super.getRoutesMap(); + } + } +} \ No newline at end of file diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/discovery/DiscoveryClientRouteLocatorTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/discovery/DiscoveryClientRouteLocatorTests.java index adda6a87..98d80bfd 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/discovery/DiscoveryClientRouteLocatorTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/discovery/DiscoveryClientRouteLocatorTests.java @@ -43,10 +43,6 @@ import static org.junit.Assert.assertTrue; import static org.mockito.BDDMockito.given; import static org.mockito.MockitoAnnotations.initMocks; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - /** * @author Spencer Gibb * @author Dave Syer @@ -69,15 +65,45 @@ public class DiscoveryClientRouteLocatorTests { private ZuulProperties properties = new ZuulProperties(); - @Data - @AllArgsConstructor - @NoArgsConstructor public static class RegexMapper { private boolean enabled = false; private String servicePattern = "(?.*)-(?v.*$)"; private String routePattern = "${version}/${name}"; + + public RegexMapper() { + } + + public RegexMapper(boolean enabled, String servicePattern, String routePattern) { + this.enabled = enabled; + this.servicePattern = servicePattern; + this.routePattern = routePattern; + } + + public boolean isEnabled() { + return enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + + public String getServicePattern() { + return servicePattern; + } + + public void setServicePattern(String servicePattern) { + this.servicePattern = servicePattern; + } + + public String getRoutePattern() { + return routePattern; + } + + public void setRoutePattern(String routePattern) { + this.routePattern = routePattern; + } } private RegexMapper regexMapper = new RegexMapper(); diff --git a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/restclient/RestClientRibbonCommandIntegrationTests.java b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/restclient/RestClientRibbonCommandIntegrationTests.java index a81037f0..521e144c 100644 --- a/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/restclient/RestClientRibbonCommandIntegrationTests.java +++ b/spring-cloud-netflix-core/src/test/java/org/springframework/cloud/netflix/zuul/filters/route/restclient/RestClientRibbonCommandIntegrationTests.java @@ -85,8 +85,6 @@ import com.netflix.loadbalancer.Server; import com.netflix.loadbalancer.ServerList; import com.netflix.niws.client.http.RestClient; -import lombok.SneakyThrows; - @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = RestClientRibbonCommandIntegrationTests.TestConfig.class, webEnvironment = WebEnvironment.RANDOM_PORT, value = { "zuul.routes.other: /test/**=http://localhost:7777/local", @@ -369,7 +367,6 @@ public class RestClientRibbonCommandIntegrationTests extends ZuulProxyTestBase { @Override @SuppressWarnings("deprecation") - @SneakyThrows public RestClientRibbonCommand create(RibbonCommandContext context) { String uri = context.getUri(); if (uri.startsWith("/throwexception/")) { diff --git a/spring-cloud-netflix-dependencies/pom.xml b/spring-cloud-netflix-dependencies/pom.xml index c8e50d51..e377e8fa 100644 --- a/spring-cloud-netflix-dependencies/pom.xml +++ b/spring-cloud-netflix-dependencies/pom.xml @@ -21,7 +21,7 @@ 2.2.2 0.10.1 1.3.0 - 1.1.10 + 1.2.0 1.7 1.0.0 1.19.1 diff --git a/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java b/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java index c88bbb42..80c785d4 100644 --- a/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java +++ b/spring-cloud-netflix-eureka-server/src/main/java/org/springframework/cloud/netflix/eureka/server/EurekaServerConfigBean.java @@ -16,23 +16,24 @@ package org.springframework.cloud.netflix.eureka.server; +import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Map; +import java.util.Objects; import java.util.Set; -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.core.env.PropertyResolver; import com.netflix.eureka.EurekaServerConfig; import com.netflix.eureka.aws.AwsBindingStrategy; +import org.springframework.core.style.ToStringCreator; /** * @author Dave Syer + * @author Gregor Zurowski */ @ConfigurationProperties(EurekaServerConfigBean.PREFIX) public class EurekaServerConfigBean implements EurekaServerConfig { @@ -919,19 +920,203 @@ public class EurekaServerConfigBean implements EurekaServerConfig { this.minAvailableInstancesForPeerReplication = minAvailableInstancesForPeerReplication; } - @Override - public boolean equals(Object o) { - return EqualsBuilder.reflectionEquals(this, o); + @Override public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + EurekaServerConfigBean that = (EurekaServerConfigBean) o; + return aSGCacheExpiryTimeoutMs == that.aSGCacheExpiryTimeoutMs && + aSGQueryTimeoutMs == that.aSGQueryTimeoutMs && + aSGUpdateIntervalMs == that.aSGUpdateIntervalMs && + Objects.equals(aWSAccessId, that.aWSAccessId) && + Objects.equals(aWSSecretKey, that.aWSSecretKey) && + batchReplication == that.batchReplication && + bindingStrategy == that.bindingStrategy && + deltaRetentionTimerIntervalInMs == that.deltaRetentionTimerIntervalInMs && + disableDelta == that.disableDelta && + disableDeltaForRemoteRegions == that.disableDeltaForRemoteRegions && + disableTransparentFallbackToOtherRegion == that.disableTransparentFallbackToOtherRegion && + eIPBindingRetryIntervalMs == that.eIPBindingRetryIntervalMs && + eIPBindingRetryIntervalMsWhenUnbound == that.eIPBindingRetryIntervalMsWhenUnbound && + eIPBindRebindRetries == that.eIPBindRebindRetries && + enableReplicatedRequestCompression == that.enableReplicatedRequestCompression && + enableSelfPreservation == that.enableSelfPreservation && + evictionIntervalTimerInMs == that.evictionIntervalTimerInMs && + gZipContentFromRemoteRegion == that.gZipContentFromRemoteRegion && + Objects.equals(jsonCodecName, that.jsonCodecName) && + Objects.equals(listAutoScalingGroupsRoleName, that.listAutoScalingGroupsRoleName) && + logIdentityHeaders == that.logIdentityHeaders && + maxElementsInPeerReplicationPool == that.maxElementsInPeerReplicationPool && + maxElementsInStatusReplicationPool == that.maxElementsInStatusReplicationPool && + maxIdleThreadAgeInMinutesForPeerReplication == that.maxIdleThreadAgeInMinutesForPeerReplication && + maxIdleThreadInMinutesAgeForStatusReplication == that.maxIdleThreadInMinutesAgeForStatusReplication && + maxThreadsForPeerReplication == that.maxThreadsForPeerReplication && + maxThreadsForStatusReplication == that.maxThreadsForStatusReplication && + maxTimeForReplication == that.maxTimeForReplication && + minAvailableInstancesForPeerReplication == that.minAvailableInstancesForPeerReplication && + minThreadsForPeerReplication == that.minThreadsForPeerReplication && + minThreadsForStatusReplication == that.minThreadsForStatusReplication && + numberOfReplicationRetries == that.numberOfReplicationRetries && + peerEurekaNodesUpdateIntervalMs == that.peerEurekaNodesUpdateIntervalMs && + peerEurekaStatusRefreshTimeIntervalMs == that.peerEurekaStatusRefreshTimeIntervalMs && + peerNodeConnectionIdleTimeoutSeconds == that.peerNodeConnectionIdleTimeoutSeconds && + peerNodeConnectTimeoutMs == that.peerNodeConnectTimeoutMs && + peerNodeReadTimeoutMs == that.peerNodeReadTimeoutMs && + peerNodeTotalConnections == that.peerNodeTotalConnections && + peerNodeTotalConnectionsPerHost == that.peerNodeTotalConnectionsPerHost && + primeAwsReplicaConnections == that.primeAwsReplicaConnections && + Objects.equals(propertyResolver, that.propertyResolver) && + rateLimiterBurstSize == that.rateLimiterBurstSize && + rateLimiterEnabled == that.rateLimiterEnabled && + rateLimiterFullFetchAverageRate == that.rateLimiterFullFetchAverageRate && + Objects.equals(rateLimiterPrivilegedClients, that.rateLimiterPrivilegedClients) && + rateLimiterRegistryFetchAverageRate == that.rateLimiterRegistryFetchAverageRate && + rateLimiterThrottleStandardClients == that.rateLimiterThrottleStandardClients && + registrySyncRetries == that.registrySyncRetries && + registrySyncRetryWaitMs == that.registrySyncRetryWaitMs && + Objects.equals(remoteRegionAppWhitelist, that.remoteRegionAppWhitelist) && + remoteRegionConnectionIdleTimeoutSeconds == that.remoteRegionConnectionIdleTimeoutSeconds && + remoteRegionConnectTimeoutMs == that.remoteRegionConnectTimeoutMs && + remoteRegionFetchThreadPoolSize == that.remoteRegionFetchThreadPoolSize && + remoteRegionReadTimeoutMs == that.remoteRegionReadTimeoutMs && + remoteRegionRegistryFetchInterval == that.remoteRegionRegistryFetchInterval && + remoteRegionTotalConnections == that.remoteRegionTotalConnections && + remoteRegionTotalConnectionsPerHost == that.remoteRegionTotalConnectionsPerHost && + Objects.equals(remoteRegionTrustStore, that.remoteRegionTrustStore) && + Objects.equals(remoteRegionTrustStorePassword, that.remoteRegionTrustStorePassword) && + Arrays.equals(remoteRegionUrls, that.remoteRegionUrls) && + Objects.equals(remoteRegionUrlsWithName, that.remoteRegionUrlsWithName) && + Double.compare(that.renewalPercentThreshold, renewalPercentThreshold) == 0 && + renewalThresholdUpdateIntervalMs == that.renewalThresholdUpdateIntervalMs && + responseCacheAutoExpirationInSeconds == that.responseCacheAutoExpirationInSeconds && + responseCacheUpdateIntervalMs == that.responseCacheUpdateIntervalMs && + retentionTimeInMSInDeltaQueue == that.retentionTimeInMSInDeltaQueue && + route53BindingRetryIntervalMs == that.route53BindingRetryIntervalMs && + route53BindRebindRetries == that.route53BindRebindRetries && + route53DomainTTL == that.route53DomainTTL && + syncWhenTimestampDiffers == that.syncWhenTimestampDiffers && + useReadOnlyResponseCache == that.useReadOnlyResponseCache && + waitTimeInMsWhenSyncEmpty == that.waitTimeInMsWhenSyncEmpty && + Objects.equals(xmlCodecName, that.xmlCodecName); } @Override public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); + return Objects.hash(aSGCacheExpiryTimeoutMs, aSGQueryTimeoutMs, + aSGUpdateIntervalMs, aWSAccessId, aWSSecretKey, batchReplication, + bindingStrategy, deltaRetentionTimerIntervalInMs, disableDelta, + disableDeltaForRemoteRegions, + disableTransparentFallbackToOtherRegion, eIPBindRebindRetries, + eIPBindingRetryIntervalMs, eIPBindingRetryIntervalMsWhenUnbound, + enableReplicatedRequestCompression, enableSelfPreservation, + evictionIntervalTimerInMs, gZipContentFromRemoteRegion, + jsonCodecName, listAutoScalingGroupsRoleName, logIdentityHeaders, + maxElementsInPeerReplicationPool, maxElementsInStatusReplicationPool, + maxIdleThreadAgeInMinutesForPeerReplication, + maxIdleThreadInMinutesAgeForStatusReplication, + maxThreadsForPeerReplication, maxThreadsForStatusReplication, + maxTimeForReplication, minAvailableInstancesForPeerReplication, + minThreadsForPeerReplication, minThreadsForStatusReplication, + numberOfReplicationRetries, peerEurekaNodesUpdateIntervalMs, + peerEurekaStatusRefreshTimeIntervalMs, peerNodeConnectTimeoutMs, + peerNodeConnectionIdleTimeoutSeconds, peerNodeReadTimeoutMs, + peerNodeTotalConnections, peerNodeTotalConnectionsPerHost, + primeAwsReplicaConnections, propertyResolver, rateLimiterBurstSize, + rateLimiterEnabled, rateLimiterFullFetchAverageRate, + rateLimiterPrivilegedClients, rateLimiterRegistryFetchAverageRate, + rateLimiterThrottleStandardClients, registrySyncRetries, + registrySyncRetryWaitMs, remoteRegionAppWhitelist, + remoteRegionConnectTimeoutMs, + remoteRegionConnectionIdleTimeoutSeconds, + remoteRegionFetchThreadPoolSize, remoteRegionReadTimeoutMs, + remoteRegionRegistryFetchInterval, remoteRegionTotalConnections, + remoteRegionTotalConnectionsPerHost, remoteRegionTrustStore, + remoteRegionTrustStorePassword, remoteRegionUrls, + remoteRegionUrlsWithName, renewalPercentThreshold, + renewalThresholdUpdateIntervalMs, + responseCacheAutoExpirationInSeconds, + responseCacheUpdateIntervalMs, retentionTimeInMSInDeltaQueue, + route53BindRebindRetries, route53BindingRetryIntervalMs, + route53DomainTTL, syncWhenTimestampDiffers, + useReadOnlyResponseCache, waitTimeInMsWhenSyncEmpty, xmlCodecName); } @Override public String toString() { - return ToStringBuilder.reflectionToString(this); + return new ToStringCreator(this) + .append("aSGCacheExpiryTimeoutMs", this.aSGCacheExpiryTimeoutMs) + .append("aSGQueryTimeoutMs", this.aSGQueryTimeoutMs) + .append("aSGUpdateIntervalMs", this.aSGUpdateIntervalMs) + .append("aWSAccessId", this.aWSAccessId) + .append("aWSSecretKey", this.aWSSecretKey) + .append("batchReplication", this.batchReplication) + .append("bindingStrategy", this.bindingStrategy) + .append("deltaRetentionTimerIntervalInMs", this.deltaRetentionTimerIntervalInMs) + .append("disableDelta", this.disableDelta) + .append("disableDeltaForRemoteRegions", this.disableDeltaForRemoteRegions) + .append("disableTransparentFallbackToOtherRegion", this.disableTransparentFallbackToOtherRegion) + .append("eIPBindRebindRetries", this.eIPBindRebindRetries) + .append("eIPBindingRetryIntervalMs", this.eIPBindingRetryIntervalMs) + .append("eIPBindingRetryIntervalMsWhenUnbound", this.eIPBindingRetryIntervalMsWhenUnbound) + .append("enableReplicatedRequestCompression", this.enableReplicatedRequestCompression) + .append("enableSelfPreservation", this.enableSelfPreservation) + .append("evictionIntervalTimerInMs", this.evictionIntervalTimerInMs) + .append("gZipContentFromRemoteRegion", this.gZipContentFromRemoteRegion) + .append("jsonCodecName", this.jsonCodecName) + .append("listAutoScalingGroupsRoleName", this.listAutoScalingGroupsRoleName) + .append("logIdentityHeaders", this.logIdentityHeaders) + .append("maxElementsInPeerReplicationPool", this.maxElementsInPeerReplicationPool) + .append("maxElementsInStatusReplicationPool", this.maxElementsInStatusReplicationPool) + .append("maxIdleThreadAgeInMinutesForPeerReplication", this.maxIdleThreadAgeInMinutesForPeerReplication) + .append("maxIdleThreadInMinutesAgeForStatusReplication", this.maxIdleThreadInMinutesAgeForStatusReplication) + .append("maxThreadsForPeerReplication", this.maxThreadsForPeerReplication) + .append("maxThreadsForStatusReplication", this.maxThreadsForStatusReplication) + .append("maxTimeForReplication", this.maxTimeForReplication) + .append("minAvailableInstancesForPeerReplication", this.minAvailableInstancesForPeerReplication) + .append("minThreadsForPeerReplication", this.minThreadsForPeerReplication) + .append("minThreadsForStatusReplication", this.minThreadsForStatusReplication) + .append("numberOfReplicationRetries", this.numberOfReplicationRetries) + .append("peerEurekaNodesUpdateIntervalMs", this.peerEurekaNodesUpdateIntervalMs) + .append("peerEurekaStatusRefreshTimeIntervalMs", this.peerEurekaStatusRefreshTimeIntervalMs) + .append("peerNodeConnectTimeoutMs", this.peerNodeConnectTimeoutMs) + .append("peerNodeConnectionIdleTimeoutSeconds", this.peerNodeConnectionIdleTimeoutSeconds) + .append("peerNodeReadTimeoutMs", this.peerNodeReadTimeoutMs) + .append("peerNodeTotalConnections", this.peerNodeTotalConnections) + .append("peerNodeTotalConnectionsPerHost", this.peerNodeTotalConnectionsPerHost) + .append("primeAwsReplicaConnections", this.primeAwsReplicaConnections) + .append("propertyResolver", this.propertyResolver) + .append("rateLimiterBurstSize", this.rateLimiterBurstSize) + .append("rateLimiterEnabled", this.rateLimiterEnabled) + .append("rateLimiterFullFetchAverageRate", this.rateLimiterFullFetchAverageRate) + .append("rateLimiterPrivilegedClients", this.rateLimiterPrivilegedClients) + .append("rateLimiterRegistryFetchAverageRate", this.rateLimiterRegistryFetchAverageRate) + .append("rateLimiterThrottleStandardClients", this.rateLimiterThrottleStandardClients) + .append("registrySyncRetries", this.registrySyncRetries) + .append("registrySyncRetryWaitMs", this.registrySyncRetryWaitMs) + .append("remoteRegionAppWhitelist", this.remoteRegionAppWhitelist) + .append("remoteRegionConnectTimeoutMs", this.remoteRegionConnectTimeoutMs) + .append("remoteRegionConnectionIdleTimeoutSeconds", this.remoteRegionConnectionIdleTimeoutSeconds) + .append("remoteRegionFetchThreadPoolSize", this.remoteRegionFetchThreadPoolSize) + .append("remoteRegionReadTimeoutMs", this.remoteRegionReadTimeoutMs) + .append("remoteRegionRegistryFetchInterval", this.remoteRegionRegistryFetchInterval) + .append("remoteRegionTotalConnections", this.remoteRegionTotalConnections) + .append("remoteRegionTotalConnectionsPerHost", this.remoteRegionTotalConnectionsPerHost) + .append("remoteRegionTrustStore", this.remoteRegionTrustStore) + .append("remoteRegionTrustStorePassword", this.remoteRegionTrustStorePassword) + .append("remoteRegionUrls", this.remoteRegionUrls) + .append("remoteRegionUrlsWithName", this.remoteRegionUrlsWithName) + .append("renewalPercentThreshold", this.renewalPercentThreshold) + .append("renewalThresholdUpdateIntervalMs", this.renewalThresholdUpdateIntervalMs) + .append("responseCacheAutoExpirationInSeconds", this.responseCacheAutoExpirationInSeconds) + .append("responseCacheUpdateIntervalMs", this.responseCacheUpdateIntervalMs) + .append("retentionTimeInMSInDeltaQueue", this.retentionTimeInMSInDeltaQueue) + .append("route53BindRebindRetries", this.route53BindRebindRetries) + .append("route53BindingRetryIntervalMs", this.route53BindingRetryIntervalMs) + .append("route53DomainTTL", this.route53DomainTTL) + .append("syncWhenTimestampDiffers", this.syncWhenTimestampDiffers) + .append("useReadOnlyResponseCache", this.useReadOnlyResponseCache) + .append("waitTimeInMsWhenSyncEmpty", this.waitTimeInMsWhenSyncEmpty) + .append("xmlCodecName", this.xmlCodecName) + .toString(); } } diff --git a/spring-cloud-starter-netflix/spring-cloud-starter-netflix-eureka-server/pom.xml b/spring-cloud-starter-netflix/spring-cloud-starter-netflix-eureka-server/pom.xml index 8ac266a9..271e852c 100644 --- a/spring-cloud-starter-netflix/spring-cloud-starter-netflix-eureka-server/pom.xml +++ b/spring-cloud-starter-netflix/spring-cloud-starter-netflix-eureka-server/pom.xml @@ -1,11 +1,11 @@ - 4.0.0 - - org.springframework.cloud - spring-cloud-starter-netflix - 2.0.0.BUILD-SNAPSHOT - - spring-cloud-starter-netflix-eureka-server + 4.0.0 + + org.springframework.cloud + spring-cloud-starter-netflix + 2.0.0.BUILD-SNAPSHOT + + spring-cloud-starter-netflix-eureka-server Spring Cloud Starter Netflix Eureka Server Spring Cloud Starter Netflix Eureka Server https://projects.spring.io/spring-cloud diff --git a/spring-cloud-starter-netflix/spring-cloud-starter-netflix-turbine-amqp/pom.xml b/spring-cloud-starter-netflix/spring-cloud-starter-netflix-turbine-amqp/pom.xml index 8db06884..901b225d 100644 --- a/spring-cloud-starter-netflix/spring-cloud-starter-netflix-turbine-amqp/pom.xml +++ b/spring-cloud-starter-netflix/spring-cloud-starter-netflix-turbine-amqp/pom.xml @@ -1,12 +1,12 @@ - 4.0.0 - - org.springframework.cloud - spring-cloud-starter-netflix - 2.0.0.BUILD-SNAPSHOT - - spring-cloud-starter-netflix-turbine-amqp - Spring Cloud Starter Netflix Turbine AMQP + 4.0.0 + + org.springframework.cloud + spring-cloud-starter-netflix + 2.0.0.BUILD-SNAPSHOT + + spring-cloud-starter-netflix-turbine-amqp + Spring Cloud Starter Netflix Turbine AMQP Spring Cloud Starter Netflix Turbine AMQP (deprecated, please use spring-cloud-starter-netflix-turbine-stream) https://projects.spring.io/spring-cloud