From e924745bf81aa5997febd21bcd3bdbc74f2e68fb Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 13 Feb 2019 11:15:29 +0000 Subject: [PATCH 1/6] Start building against Spring Data Moore M2 snapshots See gh-15197 --- .../JdbcRepositoriesAutoConfiguration.java | 41 +++++-------------- ...dbcRepositoriesAutoConfigurationTests.java | 10 ++--- .../spring-boot-dependencies/pom.xml | 2 +- 3 files changed, 16 insertions(+), 37 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration.java index c367030382..7efb31ee29 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 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. @@ -16,8 +16,6 @@ package org.springframework.boot.autoconfigure.data.jdbc; -import java.util.Optional; - import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; @@ -27,29 +25,28 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.data.jdbc.core.convert.JdbcCustomConversions; +import org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration; import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories; import org.springframework.data.jdbc.repository.config.JdbcConfiguration; import org.springframework.data.jdbc.repository.config.JdbcRepositoryConfigExtension; -import org.springframework.data.relational.core.conversion.RelationalConverter; -import org.springframework.data.relational.core.mapping.NamingStrategy; -import org.springframework.data.relational.core.mapping.RelationalMappingContext; import org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations; /** * {@link EnableAutoConfiguration Auto-configuration} for Spring Data's JDBC Repositories. *

* Once in effect, the auto-configuration is the equivalent of enabling JDBC repositories - * using the {@link EnableJdbcRepositories} annotation and providing a - * {@link JdbcConfiguration} subclass. + * using the {@link EnableJdbcRepositories} annotation and providing an + * {@link AbstractJdbcConfiguration} subclass. * * @author Andy Wilkinson * @since 2.1.0 * @see EnableJdbcRepositories */ +@SuppressWarnings("deprecation") @Configuration @ConditionalOnBean(NamedParameterJdbcOperations.class) -@ConditionalOnClass({ NamedParameterJdbcOperations.class, JdbcConfiguration.class }) +@ConditionalOnClass({ NamedParameterJdbcOperations.class, + AbstractJdbcConfiguration.class }) @ConditionalOnProperty(prefix = "spring.data.jdbc.repositories", name = "enabled", havingValue = "true", matchIfMissing = true) @AutoConfigureAfter(JdbcTemplateAutoConfiguration.class) public class JdbcRepositoriesAutoConfiguration { @@ -62,27 +59,9 @@ public class JdbcRepositoriesAutoConfiguration { } @Configuration - @ConditionalOnMissingBean(JdbcConfiguration.class) - static class SpringBootJdbcConfiguration extends JdbcConfiguration { - - // Remove these public methods when they are made - // public in Spring Data - @Override - public JdbcCustomConversions jdbcCustomConversions() { - return super.jdbcCustomConversions(); - } - - @Override - public RelationalMappingContext jdbcMappingContext( - Optional namingStrategy) { - return super.jdbcMappingContext(namingStrategy); - } - - @Override - public RelationalConverter relationalConverter( - RelationalMappingContext mappingContext) { - return super.relationalConverter(mappingContext); - } + @ConditionalOnMissingBean({ AbstractJdbcConfiguration.class, + JdbcConfiguration.class }) + static class SpringBootJdbcConfiguration extends AbstractJdbcConfiguration { } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfigurationTests.java index 30ce6f1a33..346a22ba6d 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/jdbc/JdbcRepositoriesAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 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. @@ -30,8 +30,8 @@ import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfigurati import org.springframework.boot.autoconfigure.jdbc.JdbcTemplateAutoConfiguration; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.Configuration; +import org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration; import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories; -import org.springframework.data.jdbc.repository.config.JdbcConfiguration; import org.springframework.data.jdbc.repository.config.JdbcRepositoryConfigExtension; import org.springframework.data.repository.Repository; @@ -78,7 +78,7 @@ public class JdbcRepositoriesAutoConfigurationTests { "spring.datasource.data=classpath:city.sql", "spring.datasource.generate-unique-name:true") .run((context) -> { - assertThat(context).hasSingleBean(JdbcConfiguration.class); + assertThat(context).hasSingleBean(AbstractJdbcConfiguration.class); assertThat(context).hasSingleBean(CityRepository.class); assertThat(context.getBean(CityRepository.class).findById(2000L)) .isPresent(); @@ -93,7 +93,7 @@ public class JdbcRepositoriesAutoConfigurationTests { .withUserConfiguration(EmbeddedDataSourceConfiguration.class, EmptyConfiguration.class) .run((context) -> { - assertThat(context).hasSingleBean(JdbcConfiguration.class); + assertThat(context).hasSingleBean(AbstractJdbcConfiguration.class); assertThat(context).doesNotHaveBean(Repository.class); }); } @@ -111,7 +111,7 @@ public class JdbcRepositoriesAutoConfigurationTests { "spring.datasource.data=classpath:city.sql", "spring.datasource.generate-unique-name:true") .run((context) -> { - assertThat(context).hasSingleBean(JdbcConfiguration.class); + assertThat(context).hasSingleBean(AbstractJdbcConfiguration.class); assertThat(context).hasSingleBean(CityRepository.class); assertThat(context.getBean(CityRepository.class).findById(2000L)) .isPresent(); diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index ecf54f03cb..5331e73298 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -166,7 +166,7 @@ 2.1.4.BUILD-SNAPSHOT 4.1.1.RELEASE 2.0.4.RELEASE - Lovelace-BUILD-SNAPSHOT + Moore-BUILD-SNAPSHOT ${spring.version} 0.25.0.RELEASE 5.1.3.BUILD-SNAPSHOT From 7a8104ac0e807e471920761a0f8bdd3dca319f2e Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 13 Feb 2019 11:15:51 +0000 Subject: [PATCH 2/6] Upgrade to Elasticsearch 6.5.4 Closes gh-15938 --- spring-boot-project/spring-boot-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index 5331e73298..62a0504b82 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -61,7 +61,7 @@ 2.2.0 5.2.4 2.3.28 - 6.4.3 + 6.5.4 3.0.0 2.3.1 2.5.6 From 330f5b70f2ab0ecbc6cdf535b09d0a3f718bb2f7 Mon Sep 17 00:00:00 2001 From: Michael Simons Date: Mon, 7 Jan 2019 14:32:08 +0100 Subject: [PATCH 3/6] Upgrade to Neo4j-OGM 3.2.0-alpha04 Closes gh-15937 --- .../boot/actuate/neo4j/Neo4jHealthIndicatorTests.java | 8 ++++---- spring-boot-project/spring-boot-dependencies/pom.xml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java index 7608667b91..cfe0d3021a 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/neo4j/Neo4jHealthIndicatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2018 the original author or authors. + * Copyright 2012-2019 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. @@ -42,6 +42,7 @@ import static org.mockito.Mockito.mock; * * @author Eric Spiegelberg * @author Stephane Nicoll + * @author Michael Simons */ public class Neo4jHealthIndicatorTests { @@ -77,9 +78,8 @@ public class Neo4jHealthIndicatorTests { @Test public void neo4jDown() { - CypherException cypherException = new CypherException("Error executing Cypher", - "Neo.ClientError.Statement.SyntaxError", - "Unable to execute invalid Cypher"); + CypherException cypherException = new CypherException( + "Neo.ClientError.Statement.SyntaxError", "Error executing Cypher"); given(this.session.query(Neo4jHealthIndicator.CYPHER, Collections.emptyMap())) .willThrow(cypherException); Health health = this.neo4jHealthIndicator.health(); diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index 62a0504b82..afbce0d6aa 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -138,7 +138,7 @@ 6.4.0.jre8 8.0.15 1.9.22 - 3.1.7 + 3.2.0-alpha04 4.1.33.Final 2.0.20.Final 1.1.0 From bb4cdd3ba136347f32ff39df69af0063395f1d6e Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 13 Feb 2019 11:34:21 +0000 Subject: [PATCH 4/6] Start building against Spring HATEOAS 1.0.0.M1 snapshots See gh-15939 --- spring-boot-project/spring-boot-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index afbce0d6aa..2d0c46e9a2 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -168,7 +168,7 @@ 2.0.4.RELEASE Moore-BUILD-SNAPSHOT ${spring.version} - 0.25.0.RELEASE + 1.0.0.BUILD-SNAPSHOT 5.1.3.BUILD-SNAPSHOT 2.2.4.BUILD-SNAPSHOT 2.3.2.RELEASE From a0b826ce4d91fe48530199cbf99fe1a2c8ad0913 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 13 Feb 2019 11:37:44 +0000 Subject: [PATCH 5/6] Start building against Spring Plugin 2.0.0.M1 snapshots See gh-15940 --- spring-boot-project/spring-boot-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index 2d0c46e9a2..107a2cc62a 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -172,7 +172,7 @@ 5.1.3.BUILD-SNAPSHOT 2.2.4.BUILD-SNAPSHOT 2.3.2.RELEASE - 1.2.0.RELEASE + 2.0.0.BUILD-SNAPSHOT 2.0.3.RELEASE 1.2.4.RELEASE 5.1.4.BUILD-SNAPSHOT From b3312d7de48e60395327a48e2c34ab47be5cbb3b Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 13 Feb 2019 12:43:16 +0000 Subject: [PATCH 6/6] Upgrade to Jedis 3.0.1 Closes gh-15941 --- spring-boot-project/spring-boot-dependencies/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-dependencies/pom.xml b/spring-boot-project/spring-boot-dependencies/pom.xml index 107a2cc62a..450b917e2c 100644 --- a/spring-boot-project/spring-boot-dependencies/pom.xml +++ b/spring-boot-project/spring-boot-dependencies/pom.xml @@ -101,7 +101,7 @@ 3.3.2.Final 7.6.0.Final 2.0.6 - 2.9.1 + 3.0.1 2.27 6.3.1 9.4.14.v20181114