From d13878e193df3324470bdf96eab7f4210e23a029 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 9 Apr 2015 12:03:02 +0100 Subject: [PATCH] Upgrade to Spring Data Fowler RELEASE The versions in the dependency management for the various datastore dependencies have been aligned with those used by Spring Data Fowler. The Data REST tests and sample application has been updated to configure the base path in favour of the deprecated base uri property Closes gh-2673 --- ...RepositoryRestMvcAutoConfigurationTests.java | 17 +++++++++-------- spring-boot-dependencies/pom.xml | 8 ++++---- .../src/main/resources/application.properties | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java index 64c5650a1e..118f48affb 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java @@ -69,21 +69,21 @@ public class RepositoryRestMvcAutoConfigurationTests { } @Test - public void testWithCustomBaseUri() throws Exception { - load(TestConfiguration.class, "spring.data.rest.baseUri:foo"); + public void testWithCustomBasePath() throws Exception { + load(TestConfiguration.class, "spring.data.rest.base-path:foo"); assertNotNull(this.context.getBean(RepositoryRestMvcConfiguration.class)); RepositoryRestConfiguration bean = this.context .getBean(RepositoryRestConfiguration.class); - URI expectedUri = URI.create("foo"); - assertEquals("Custom baseURI not set", expectedUri, bean.getBaseUri()); + URI expectedUri = URI.create("/foo"); + assertEquals("Custom basePath not set", expectedUri, bean.getBaseUri()); BaseUri baseUri = this.context.getBean(BaseUri.class); - assertEquals("Custom baseUri has not been applied to BaseUri bean", expectedUri, + assertEquals("Custom basePath has not been applied to BaseUri bean", expectedUri, baseUri.getUri()); } @Test public void backOffWithCustomConfiguration() { - load(TestConfigurationWithRestMvcConfig.class, "spring.data.rest.baseUri:foo"); + load(TestConfigurationWithRestMvcConfig.class, "spring.data.rest.base-path:foo"); assertNotNull(this.context.getBean(RepositoryRestMvcConfiguration.class)); RepositoryRestConfiguration bean = this.context .getBean(RepositoryRestConfiguration.class); @@ -93,11 +93,12 @@ public class RepositoryRestMvcAutoConfigurationTests { @Test public void propertiesStillAppliedWithCustomBootConfig() { - load(TestConfigurationWithRestMvcBootConfig.class, "spring.data.rest.baseUri:foo"); + load(TestConfigurationWithRestMvcBootConfig.class, + "spring.data.rest.base-path:foo"); assertNotNull(this.context.getBean(RepositoryRestMvcConfiguration.class)); RepositoryRestConfiguration bean = this.context .getBean(RepositoryRestConfiguration.class); - assertEquals("Custom base URI should have been set", URI.create("foo"), + assertEquals("Custom base URI should have been set", URI.create("/foo"), bean.getBaseUri()); } diff --git a/spring-boot-dependencies/pom.xml b/spring-boot-dependencies/pom.xml index a32ec83c1b..255547d1d9 100644 --- a/spring-boot-dependencies/pom.xml +++ b/spring-boot-dependencies/pom.xml @@ -88,7 +88,7 @@ 1.2 1.1.6 2.0.6 - 2.5.2 + 2.6.2 2.14 9.2.9.v20150224 2.2.0.v201112011158 @@ -104,7 +104,7 @@ 1.1.3 1.1.8 1.10.19 - 2.12.5 + 2.13.0 5.1.34 1.9.21 9.4-1201-jdbc41 @@ -115,13 +115,13 @@ 1.1.1 1.7.11 1.14 - 4.7.2 + 4.10.1 0.7-groovy-2.0 4.2.0.BUILD-SNAPSHOT 1.4.4.RELEASE 1.1.1.RELEASE 3.0.4.BUILD-SNAPSHOT - Fowler-RC1 + Fowler-RELEASE 0.16.0.RELEASE 4.1.3.RELEASE 1.2.1.RELEASE diff --git a/spring-boot-samples/spring-boot-sample-data-rest/src/main/resources/application.properties b/spring-boot-samples/spring-boot-sample-data-rest/src/main/resources/application.properties index 22a152b9fb..d329a65ebd 100644 --- a/spring-boot-samples/spring-boot-sample-data-rest/src/main/resources/application.properties +++ b/spring-boot-samples/spring-boot-sample-data-rest/src/main/resources/application.properties @@ -1 +1 @@ -spring.data.rest.baseUri=/api \ No newline at end of file +spring.data.rest.base-path=/api \ No newline at end of file