Browse Source

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
pull/2780/merge
Andy Wilkinson 11 years ago
parent
commit
d13878e193
  1. 17
      spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java
  2. 8
      spring-boot-dependencies/pom.xml
  3. 2
      spring-boot-samples/spring-boot-sample-data-rest/src/main/resources/application.properties

17
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/rest/RepositoryRestMvcAutoConfigurationTests.java

@ -69,21 +69,21 @@ public class RepositoryRestMvcAutoConfigurationTests { @@ -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 { @@ -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());
}

8
spring-boot-dependencies/pom.xml

@ -88,7 +88,7 @@ @@ -88,7 +88,7 @@
<javax-transaction.version>1.2</javax-transaction.version>
<jaxen.version>1.1.6</jaxen.version>
<jdom2.version>2.0.6</jdom2.version>
<jedis.version>2.5.2</jedis.version>
<jedis.version>2.6.2</jedis.version>
<jersey.version>2.14</jersey.version>
<jetty.version>9.2.9.v20150224</jetty.version>
<jetty-jsp.version>2.2.0.v201112011158</jetty-jsp.version>
@ -104,7 +104,7 @@ @@ -104,7 +104,7 @@
<logback.version>1.1.3</logback.version>
<mariadb.version>1.1.8</mariadb.version>
<mockito.version>1.10.19</mockito.version>
<mongodb.version>2.12.5</mongodb.version>
<mongodb.version>2.13.0</mongodb.version>
<mysql.version>5.1.34</mysql.version>
<nekohtml.version>1.9.21</nekohtml.version>
<postgresql.version>9.4-1201-jdbc41</postgresql.version>
@ -115,13 +115,13 @@ @@ -115,13 +115,13 @@
<simple-json.version>1.1.1</simple-json.version>
<slf4j.version>1.7.11</slf4j.version>
<snakeyaml.version>1.14</snakeyaml.version>
<solr.version>4.7.2</solr.version>
<solr.version>4.10.1</solr.version>
<spock.version>0.7-groovy-2.0</spock.version>
<spring.version>4.2.0.BUILD-SNAPSHOT</spring.version>
<spring-amqp.version>1.4.4.RELEASE</spring-amqp.version>
<spring-cloud-connectors.version>1.1.1.RELEASE</spring-cloud-connectors.version>
<spring-batch.version>3.0.4.BUILD-SNAPSHOT</spring-batch.version>
<spring-data-releasetrain.version>Fowler-RC1</spring-data-releasetrain.version>
<spring-data-releasetrain.version>Fowler-RELEASE</spring-data-releasetrain.version>
<spring-hateoas.version>0.16.0.RELEASE</spring-hateoas.version>
<spring-integration.version>4.1.3.RELEASE</spring-integration.version>
<spring-loaded.version>1.2.1.RELEASE</spring-loaded.version>

2
spring-boot-samples/spring-boot-sample-data-rest/src/main/resources/application.properties

@ -1 +1 @@ @@ -1 +1 @@
spring.data.rest.baseUri=/api
spring.data.rest.base-path=/api
Loading…
Cancel
Save