Commit 86ac0127 by Spencer Gibb

Upgrade eureka to 1.4.1

Plus polish fixes gh-836
parent 10436160
......@@ -61,10 +61,10 @@ import com.netflix.zuul.http.ZuulServlet;
public class ZuulConfiguration {
@Autowired
private ZuulProperties zuulProperties;
protected ZuulProperties zuulProperties;
@Autowired
private ServerProperties server;
protected ServerProperties server;
@Autowired(required = false)
private ErrorController errorController;
......
......@@ -64,12 +64,6 @@ public class ZuulProxyConfiguration extends ZuulConfiguration {
private DiscoveryClient discovery;
@Autowired
private ZuulProperties zuulProperties;
@Autowired
private ServerProperties server;
@Autowired
private ServiceRouteMapper serviceRouteMapper;
@Override
......
......@@ -16,13 +16,14 @@
package org.springframework.cloud.netflix.zuul;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.TestRestTemplate;
import org.springframework.boot.test.WebIntegrationTest;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.cloud.netflix.ribbon.SpringClientFactory;
......@@ -36,7 +37,6 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -48,13 +48,17 @@ import static org.junit.Assert.assertTrue;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = SampleHttpClientZuulProxyApplication.class)
@WebAppConfiguration
@IntegrationTest({ "server.port: 0",
@WebIntegrationTest(randomPort = true, value = {
"zuul.routes.other: /test/**=http://localhost:7777/local",
"zuul.routes.another: /another/twolevel/**", "zuul.routes.simple: /simple/**" })
@DirtiesContext
public class SampleZuulProxyWithHttpClientTests extends ZuulProxyTestBase {
@Before
public void init() {
super.setTestRequestcontext();
}
@Test
public void patchOnSelfViaRibbonRoutingFilter() {
ResponseEntity<String> result = new TestRestTemplate().exchange(
......
......@@ -18,7 +18,7 @@
<spring-cloud-config.version>1.1.0.BUILD-SNAPSHOT</spring-cloud-config.version>
<spring-cloud-stream.version>1.0.0.BUILD-SNAPSHOT</spring-cloud-stream.version>
<archaius.version>0.7.3</archaius.version>
<eureka.version>1.3.8</eureka.version>
<eureka.version>1.4.1</eureka.version>
<feign.version>8.14.4</feign.version>
<hystrix.version>1.4.23</hystrix.version>
<ribbon.version>2.1.0</ribbon.version>
......
......@@ -42,10 +42,21 @@ public class CloudEurekaTransportConfig implements EurekaTransportConfig {
private String readClusterVip;
private String writeClusterVip;
private boolean bootstrapResolverForQuery = true;
private String bootstrapResolverStrategy;
private boolean applicationsResolverUseIp = false;
@Override
public boolean useBootstrapResolverForQuery() {
return this.bootstrapResolverForQuery;
}
@Override
public boolean applicationsResolverUseIp() {
return this.applicationsResolverUseIp;
}
}
......@@ -43,6 +43,10 @@
<artifactId>eureka-client</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.eureka</groupId>
<artifactId>eureka-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-archaius</artifactId>
</dependency>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment