Update to Boot 1.5.0

This commit is contained in:
Dave Syer
2016-12-12 12:31:01 +00:00
parent 8b089222bd
commit a99e23f9fc
6 changed files with 18 additions and 16 deletions

View File

@@ -10,7 +10,7 @@
<parent>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-build</artifactId>
<version>1.2.2.BUILD-SNAPSHOT</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath />
</parent>
<scm>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>spring-cloud-dependencies-parent</artifactId>
<groupId>org.springframework.cloud</groupId>
<version>1.2.2.BUILD-SNAPSHOT</version>
<version>1.3.0.BUILD-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>spring-cloud-netflix-dependencies</artifactId>

View File

@@ -42,7 +42,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.RANDOM_PORT, value = {
"spring.application.name=eureka", "server.contextPath=/context" })
"spring.application.name=eureka", "server.contextPath=/context",
"management.security.enabled=false" })
public class ApplicationContextTests {
@Value("${local.server.port}")

View File

@@ -24,9 +24,9 @@ import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
@@ -42,10 +42,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.RANDOM_PORT, value = {
"spring.application.name=eureka", "server.servletPath=/servlet" })
"spring.application.name=eureka", "server.servletPath=/servlet",
"management.security.enabled=false" })
public class ApplicationServletPathTests {
@Value("${local.server.port}")
@LocalServerPort
private int port = 0;
@Configuration

View File

@@ -30,9 +30,9 @@ import java.util.Map;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.LocalServerPort;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.boot.test.web.client.TestRestTemplate;
@@ -52,10 +52,10 @@ import com.netflix.eureka.resources.ServerCodecs;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.RANDOM_PORT, value = {
"spring.jmx.enabled=true" })
"spring.jmx.enabled=true", "management.security.enabled=false" })
public class ApplicationTests {
@Value("${local.server.port}")
@LocalServerPort
private int port = 0;
@Autowired

View File

@@ -13,6 +13,10 @@
package org.springframework.cloud.netflix.metrics.spectator;
import static org.junit.Assert.assertFalse;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import javax.servlet.http.HttpServletRequest;
import org.junit.Assert;
@@ -20,8 +24,8 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
import org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration;
import org.springframework.boot.autoconfigure.test.ImportAutoConfiguration;
import org.springframework.cloud.netflix.metrics.MetricsHandlerInterceptor;
import org.springframework.cloud.netflix.metrics.servo.ServoMonitorCache;
import org.springframework.context.annotation.Bean;
@@ -48,10 +52,6 @@ import com.netflix.servo.MonitorRegistry;
import com.netflix.servo.monitor.BasicTimer;
import com.netflix.servo.monitor.MonitorConfig;
import static org.junit.Assert.assertFalse;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
/**
* @author Jon Schneider
*/
@@ -74,8 +74,8 @@ public class SpectatorMetricsHandlerInterceptorIntegrationTests {
@Test
public void autoConfigurationWiresTheMetricsInterceptor() {
assertFalse(webAppContext.getBeansOfType(MetricsHandlerInterceptor.class)
.isEmpty());
assertFalse(
webAppContext.getBeansOfType(MetricsHandlerInterceptor.class).isEmpty());
}
@Before