Commit Graph

2101 Commits

Author SHA1 Message Date
Stephane Nicoll ff15d136db Merge branch '2.2.x'
Closes gh-20687
2020-03-26 10:42:31 +01:00
Stephane Nicoll ab01c55d8e Deprecate use of path extensions for request mapping and content negotiation
Closes gh-20528
2020-03-26 10:41:08 +01:00
Stephane Nicoll b3517a0771 Merge branch '2.2.x'
Closes gh-20671
2020-03-25 11:37:44 +01:00
Stephane Nicoll 009361d38c Merge branch '2.1.x' into 2.2.x
Closes gh-20670
2020-03-25 11:34:51 +01:00
Stephane Nicoll 18353231a0 Do not fail if "spring.datasource.url" cannot be resolved
Previously, a condition checked the value of "spring.datasource.url" to
determine if an embedded database has to be created as a fallback. When
the value is set with an unresolved placeholder, this fails even if
the DataSource is going to created by another mean ultimately.

This commit makes a more conservative check by only checking the
presence of the property rather than its value.

Closes gh-20438
2020-03-25 11:25:47 +01:00
Brian Clozel 87de8a5e15 Fix checkstyle issue 2020-03-24 23:11:05 +01:00
Brian Clozel cbe83f8db5 Make base path configurable for WebFlux applications
This commit adds the `"spring.webflux.base-path"` configuration
property. Configuring this property will gather all `HttpHandlers` into
a single composite and prefix all requests with a shared base path.

Closes gh-10129
2020-03-24 22:19:19 +01:00
Stephane Nicoll 97bf3ecf1c Polish "Migrate off deprecated Spring Data Cassandra API"
See gh-20662
2020-03-24 18:28:33 +01:00
Mark Paluch 8355d30456 Migrate off deprecated Spring Data Cassandra API
Configure UserTypeResolver and CodecRegistry on
MappingCassandraConverter. Configure on CassandraMappingContext only the
simple type holder instead of custom conversions.

See gh-20662
2020-03-24 18:28:33 +01:00
Phillip Webb 9a33a723fe Update copyright year of changed files 2020-03-23 14:15:08 -07:00
Phillip Webb 16b5ea3414 Update copyright year of changed files 2020-03-23 14:13:33 -07:00
Stephane Nicoll 1a9065f46f Merge branch '2.2.x'
Closes gh-20621
2020-03-23 14:38:03 +01:00
Stephane Nicoll 8f265f8d57 Polish "Fix @FlywayDataSource with multiple data sources"
See gh-20617
2020-03-23 14:37:23 +01:00
Shimbo Takaaki 2410d6bbd1 Fix @FlywayDataSource with multiple data sources
See gh-20617
2020-03-23 14:25:57 +01:00
Stephane Nicoll ec8d2c5843 Merge branch '2.2.x'
Closes gh-20616
2020-03-23 12:57:00 +01:00
Stephane Nicoll 39b965e1fd Merge branch '2.1.x' into 2.2.x
Closes gh-20615
2020-03-23 12:55:44 +01:00
Stephane Nicoll f5761bd508 Auto-configure listener container factory without consumer factory
Previously, the presence of a `ConsumerFactory` bean would make the
auto-configured one to back off, leading to a failure down the line if
no available instance matches the generics criterion. This commit
improves the auto-configuration to create a `ConsumerFactory<?,?>`
behind the scenes if none is available.

Closes gh-19221
2020-03-23 12:52:33 +01:00
Stephane Nicoll 3735771f9c Merge branch '2.2.x'
Closes gh-20612
2020-03-23 11:17:52 +01:00
Stephane Nicoll 08a89b6288 Polish "Configure signature algorithm when using public key jwt decoder"
See gh-20523
2020-03-23 11:17:22 +01:00
Michael Kreis 69e33d6e62 Configure signature algorithm when using public key jwt decoder
See gh-20523
2020-03-23 10:56:59 +01:00
dreis2211 ef9f1d39a3 Remove redundant MockitoAnnotations.initMocks()
See gh-20601
2020-03-22 08:43:50 +01:00
Brian Clozel ffdf9a422f Polish Liveness and Readiness support
This commit moves the core Liveness and Readiness support to its own
`availability` package. We've made this a core concept independent of
Kubernetes.

Spring Boot now produces `LivenessStateChanged` and
`ReadinessStateChanged` events as part of the typical application
lifecycle.

Liveness and Readiness Probes (`HealthIndicator` components and health
groups) are still configured only when deployed on Kubernetes.

This commit also improves the documentation around Probes best practices
and container lifecycle considerations.

See gh-19593
2020-03-20 23:54:00 +01:00
Stephane Nicoll 579a6ac254 Adapt tests for support for Java 14
See gh-20576
2020-03-19 14:54:33 +01:00
Brian Clozel fd0b2f6695 Add Kubernetes Liveness and Readiness Probes support
Prior to this commit and as of Spring Boot 2.2.0, we would advise
developers to use the Actuator health groups to define custom "liveness"
and "readiness" groups and configure them with subsets of existing
health indicators.

This commit addresses several limitations with that approach.

First, `LivenessState` and `ReadinessState` are promoted to first class
concepts in Spring Boot applications. These states should not only based
on periodic health checks. Applications should be able to track changes
(and adapt their behavior) or update states (when an error happens).

The `ApplicationStateProvider` can be injected and used by applications
components to get the current application state. Components can also
track specific `ApplicationEvent` to be notified of changes, like
`ReadinessStateChangedEvent` and `LivenessStateChangedEvent`.
Components can also publish such events with an
`ApplicationEventPublisher`. Spring Boot will track startup event and
application context state to update the liveness and readiness state of
the application. This infrastructure is available in the
main spring-boot module.

If Spring Boot Actuator is on the classpath, additional
`HealthIndicator` will be contributed to the application:
`"LivenessProveHealthIndicator"` and `"ReadinessProbeHealthIndicator"`.
Also, "liveness" and "readiness" Health groups will be defined if
they're not configured already.

Closes gh-19593
2020-03-19 14:11:00 +01:00
Stephane Nicoll 5893786cbb Polish "Add 'threads' configuration group for embedded containers"
See gh-19475
2020-03-19 13:13:45 +01:00
cbono 208f58104a Add 'threads' configuration group for embedded containers
See gh-19475
2020-03-19 12:12:11 +01:00
dreis2211 7924dd62b0 Add security.protocol to KafkaProperties
See gh-20360
2020-03-19 10:36:20 +01:00
Stephane Nicoll f470f27666 Merge branch '2.2.x'
Closes gh-20549
2020-03-17 18:15:19 +01:00
dreis2211 d9171d0afe Use @Configuration(proxyBeanMethods=false) wherever possible
See gh-20541
2020-03-17 17:17:38 +01:00
Stephane Nicoll 58eb0ba4d3 Add additional timeout settings
This commit expands the `spring.couchbase.env.timeouts` configuration
namespace with timeouts for disconnect, key-value operations with a
durability level, search, analytics and management.

Closes gh-19893

Co-authored-by: Michael Nitschinger <michael@nitschinger.at>
2020-03-17 17:00:34 +01:00
Stephane Nicoll abe43b2e83 Upgrade to Couchbase SDK v3
This commit upgrades to the Couchbase SDK v3 which brings the following
breaking changes:

* Bootstrap hosts have been replaced by a connection string and the
authentication is now mandatory.
* A `Bucket` is no longer auto-configured. The
`spring.couchbase.bucket.*` properties have been removed
* `ClusterInfo` no longer exists and has been replaced by a dedicated
API on `Cluster`.
* `CouchbaseEnvironment` no longer exist in favour of
`ClusterEnvironment`, the customizer has been renamed accordingly.
* The bootstrap-related properties have been removed. Users requiring
custom ports should supply the seed nodes and initialize a Cluster
themselves.
* The endpoints-related configuration has been consolidated in a
single IO configuration.

The Spring Data Couchbase provides an integration with the new SDK. This
leads to the following changes:

* A convenient `CouchbaseClientFactory` is auto-configured.
* Repositories are configured against a bucket and a scope. Those can
be set via configuration in `spring.data.couchbase.*`.
* The default consistency property has been removed in favour of a more
flexible annotation on the repository query methods instead. You can now
specify different query consistency on a per method basis.
* The `CacheManager` implementation is provided, as do other stores for
consistency so a dependency on `couchbase-spring-cache` is no longer
required.

See gh-19893

Co-authored-by: Michael Nitschinger <michael@nitschinger.at>
2020-03-17 17:00:09 +01:00
Stephane Nicoll e3899df22c Configure Spring Data Couchbase explicitly
This commit configures Spring Data Couchbase explicitly rather than
relying on the abstract configuration class. This has the advantage of
simplifying the auto-configuration and let it us proxy-free
configuration classes.

Spring Boot no longer uses or interacts with CouchbaseConfigurer. Users
relying on that to teach Spring Boot which components to use should
rely on `@Primary` flag instead in case of multiple beans of the same
type.

`CouchbaseConfiguration` is no longer public as extending from it is
no longer necessary. If the `CouchbaseEnvironment` has to be
customized, a `CouchbaseEnvironmentBuilderCustomizer` bean can be
registered to tune the auto-configured environment.

Closes gh-20533
2020-03-17 16:20:21 +01:00
dreis2211 5975e7bd8d Fix some deprecation warnings
See gh-20527
2020-03-15 16:33:47 +01:00
Andy Wilkinson 77dbe999b9 Polish "Add clearChecksums to Liquibase auto-configuration"
See gh-20417
2020-03-11 17:14:38 +00:00
ferengra a2680efadb Add clearCheckSums to Liquibase auto configuration
Liquibase auto configuration is extended with clearCheckSums to allow
to clear all checksums in the current changelog, so they will be
recalculated upon the next update.

See gh-20417
2020-03-11 17:11:43 +00:00
Andy Wilkinson c917b61484 Reinstate leading / in default value for spring.liquibase.change-log
Unfortunately, while redundant for new applications, removing the
leading slash adversely affected existing application upon upgrades as
it caused Liquibase to re-apply every change log.

Closes gh-20177
2020-03-10 21:22:27 +00:00
Andy Wilkinson d2ebd77861 Upgrade to Flyway 6.3.0
Closes gh-20445
2020-03-10 15:38:45 +00:00
Andy Wilkinson 308e1d3675 Add support for gracefully shutting down the web server
This commit adds support for gracefully shutting down the embedded
web server. When a grace period is configured
(server.shutdown.grace-period), upon shutdown, the web server will no
longer permit new requests and will wait for up to the grace period
for active requests to complete.

Closes gh-4657
2020-03-09 18:12:20 +00:00
dreis2211 9481f2c68d Remove hardcoded version from VersionOverridingElasticsearchContainer
See gh-20428
2020-03-09 18:33:47 +01:00
dreis2211 6036df5f33 Upgrade to Elasticsearch 7.6.1
See gh-20423
2020-03-08 13:30:06 +01:00
Stephane Nicoll e5394ceac2 Polish "Handle new Annotation.toString() behaviour in JDK 14"
See gh-20180
2020-03-07 16:55:02 +01:00
dreis2211 e22aca85e9 Handle new Annotation.toString() behaviour in JDK 14
See gh-20180
2020-03-07 16:34:40 +01:00
Stephane Nicoll 89805fdb61 Fix checkstyle violations 2020-03-04 15:04:47 +01:00
Stephane Nicoll aa4dad1d73 Polish "Allow Embedded directory to be used without spring-data-ldap"
See gh-20223
2020-03-04 14:46:04 +01:00
Frank Schmager a92c57c07d Allow Embedded directory to be used without spring-data-ldap
See gh-20223
2020-03-04 10:09:34 +01:00
Brian Clozel ea45d8ef25 Fix "spring.integration.rsocket" canonical name
See gh-18834
2020-03-03 15:50:43 +01:00
Artem Bilan 3967e76b9b Auto-Configure RSocket support for Spring Integration
This commit adds a new auto-configuration for RSocket support in Spring
Integration.

Given an application with `spring-messaging`, `spring-integration-rsocket`
and RSocket dependencies, developers are now able to leverage Spring
Integration features with RSocket.

It is now possible to configure an RSocket server with
`"spring.rsocket.server.*"` properties and let it use
`IntegrationRSocketEndpoint` or `RSocketOutboundGateway` components to
handle incoming RSocket messages. This infrastructure can handle Spring
Integration RSocket channel adapters and `@MessageMapping` handlers
(given `"spring.integration.rsocket.server.message-mapping-enabled"`is
configured.

If the `"spring.integration.rsocket.client.host"` and
`"spring.integration.rsocket.client.port"` (for TCP protocol), or
`"spring.integration.rsocket.client.uri"`  (for WebSocket) is configured
then a `ClientRSocketConnector` will be configured accordingly.

Closes gh-18834

Co-authored-by: Brian Clozel <bclozel@pivotal.io>
2020-03-03 15:15:24 +01:00
Johnny Lim 98738d22f4 Polish tests
See gh-20318
2020-02-28 09:36:19 -05:00
Stephane Nicoll 19fbac7d59 Add auto-configuration for Spring Data R2DBC
This commit adds auto-configuration support for Spring Data R2DBC. If a
`ConnectionFactory` and Spring Data are available, scanning of reactive
repositories is enabled.

This commit also adds a starter to bring R2DBC and the necessary Spring
Data libraries.

See gh-19988

Co-authored-by: Mark Paluch <mpaluch@pivotal.io>
Co-authored-by: Oliver Drotbohm <odrotbohm@pivotal.io>
2020-02-25 09:14:08 -05:00
Stephane Nicoll 5c174feb65 Add auto-configuration for R2DBC's ConnectionFactory
This commit adds auto-configuration for R2DBC. If R2DBC is on the
classpath, a `ConnectionFactory` is created similarly to the algorithm
used to create a `DataSource`.

If an url is specified, it is used to determine the R2DBC driver and
database location. If not, an embedded database is started (with only
support of H2 via r2dbc-h2). If none of those succeed, an exception is
thrown that is handled by a dedicated FailureAnalyzer.

To clearly separate reactive from imperative access, a `DataSource` is
not auto-configured if a `ConnectionFactory` is present. This makes sure
that any auto-configuration that relies on the presence of a
`DataSource` backs off.

There is no dedicated database initialization at the moment but it is
possible to configure flyway or liquibase to create a local `DataSource`
for the duration of the migration. Alternatively, if Spring Data R2DBC
is on the classpath, a `ResourceDatabasePopulator` bean can be defined
with the scripts to execute on startup.

See gh-19988

Co-authored-by: Mark Paluch <mpaluch@pivotal.io>
2020-02-25 09:12:28 -05:00
Stephane Nicoll 402eb87847 Upgrade to Tomcat 9.0.31
Closes gh-20277
2020-02-21 14:33:22 +01:00
Stephane Nicoll a7f3b801ae Upgrade to Sendgrid 4.4.5
Closes gh-20268
2020-02-21 14:33:15 +01:00
Stephane Nicoll a039f6328d Start building against Spring Framework 5.2.4 snapshots
See gh-20240
2020-02-20 14:29:15 +01:00
Stephane Nicoll 67d2258e76 Start building against Spring Framework 5.2.4 snapshots
See gh-20199
2020-02-20 14:24:55 +01:00
Scott Frederick 8f84dbe3cf Harmonize MongoDB client factories
This commit brings MongoClientFactory and ReactiveMongoClientFactory
into functional alignment and reduces duplication in the classes
and their tests.

There are no behavior changes to ReactiveMongoClientFactory.
MongoClientFactory now throws an exception when a URI is configured
along with a host, port, or credentials, where it previousy ignored
host, port, and credentials silently. MongClientFactory now also
supports MongoClientSettingsBuilderCustomizers.

Fixes gh-20019
2020-02-19 10:15:40 -06:00
Stephane Nicoll d65e06081f Update copyright year of changed files
See gh-20226
2020-02-19 09:35:28 +01:00
Johnny Lim 8be8a8421d Polish
See gh-20226
2020-02-19 09:34:46 +01:00
Stephane Nicoll 287d577aea Merge branch '2.2.x'
Closes gh-20218
2020-02-18 16:59:52 +01:00
Stephane Nicoll 1d60184075 Merge branch '2.1.x' into 2.2.x
Closes gh-20217
2020-02-18 16:58:46 +01:00
Stephane Nicoll 2147976c17 Do not fallback to embedded configuration if a datasource url is set
This commit makes sure that a fallback embedded datasource is not
created if no suitable connection pool is found and an url has been
explicitly registered.

This is consistent with EmbeddedDataSourceConfiguration as it is using
EmbeddedDatabaseBuilder behind the scenes and the latter does not
honour the configured URL anyway.

Closes gh-19192
2020-02-18 16:27:31 +01:00
Stephane Nicoll 4bcf4245d1 Polish "Add support for configuring Liquibase tag property"
See gh-19316
2020-02-17 09:53:59 +01:00
Eddú Meléndez 407e237f10 Add support for configuring Liquibase tag property
See gh-19316
2020-02-17 09:46:42 +01:00
Stephane Nicoll b56c4f1a4d Polish "Add support for configuring Jetty's backing queue"
See gh-19494
2020-02-14 14:54:28 +01:00
cbono 852734b129 Add support for configuring Jetty's backing queue
See gh-19494
2020-02-14 14:01:06 +01:00
Stephane Nicoll 2ede9e63b9 Merge branch '2.1.x' into 2.2.x
Closes gh-20117
2020-02-14 10:20:33 +01:00
Stephane Nicoll 32c1dd45a9 Revert "Merge pull request #19926 from xak2000"
Closes gh-19926
2020-02-14 10:18:02 +01:00
Andy Wilkinson 09fa8255cd Upgrade to Tomcat 9.0.31
Closes gh-20167
2020-02-13 20:17:18 +00:00
Stephane Nicoll faaf9a7e0c Upgrade to SendGrid 4.4.4
Closes gh-20092
2020-02-13 13:49:56 +01:00
dreis2211 23bf948101 Upgrade to Asciidoctor Gradle JVM 3.0.0
See gh-19953
2020-02-13 09:42:17 +00:00
Stephane Nicoll 00b10e655e Merge branch '2.2.x'
Closes gh-20125
2020-02-11 16:27:33 +01:00
Stephane Nicoll 8f06d819e4 Harmonize JMS connection factory bean names
This commit restores consistent naming for the auto-configured
connection factory.

Closes gh-19565
2020-02-11 16:23:56 +01:00
Stephane Nicoll 466c1ba251 Merge branch '2.2.x'
Closes gh-20118
2020-02-11 10:31:03 +01:00
Stephane Nicoll a425cc1b46 Merge branch '2.1.x' into 2.2.x
Closes gh-20117
2020-02-11 10:30:19 +01:00
Ruslan Stelmachenko 5f7e1ac4f2 Remove unnecessary leading slash in changelog locations
See gh-19926
2020-02-11 10:14:49 +01:00
Stephane Nicoll 32bd845a7d Merge branch '2.2.x'
Closes gh-20116
2020-02-11 09:31:03 +01:00
Stephane Nicoll 66809c6c1e Polish "Fix condition source in OnBeanCondition"
See gh-19948
2020-02-11 09:27:59 +01:00
Jorge Cordoba 547fc30ead Fix condition source in OnBeanCondition
See gh-19948
2020-02-11 09:10:07 +01:00
dreis2211 aa0360e1ba Fix some deprecation warnings
See gh-20108
2020-02-10 15:28:30 +01:00
Stephane Nicoll ddcf5966bb Disable Spring Data Neo4j's open session in view by default
Closes gh-20012
2020-02-10 12:28:25 +01:00
Stephane Nicoll 77bdf992ec Polish "Create HazelCastClient if necessary"
See gh-20109
2020-02-10 11:41:10 +01:00
Dmytro Nosan 67dd9ad537 Create HazelCastClient if necessary
This commit makes sure to create a HazelcastClient if an instance name
is provided in configuration and if no such client already exists. This
harmonizes the behaviour with of the server counter-part.

See gh-20109
2020-02-10 11:39:55 +01:00
Stephane Nicoll aa56a6f647 Add missing mockito dependency
Closes gh-20097
2020-02-07 16:48:44 +01:00
Stephane Nicoll b5e23e7405 Update copyright year of changed files
See gh-20020
2020-02-03 17:39:40 +01:00
Johnny Lim b67ece48e4 Polish
See gh-20020
2020-02-03 17:37:01 +01:00
Stephane Nicoll 5833d2c5e8 Fix Embedded Mongo classpath check
This commit changes the classpath check condition to verify that the
core module of the MongoDB driver is present. Previously, we were only
checking for the presence of the sync driver, making embedded support
unavailable with the reactive variant.

Closes gh-19960
2020-02-03 16:06:30 +01:00
Stephane Nicoll c4daff7225 Polish "Upgrade to MongoDB Java Driver 4.0 beta1"
See gh-19960
2020-02-03 14:12:46 +01:00
Christoph Strobl d2d6dbdc00 Upgrade to MongoDB Java Driver 4.0 beta1
See gh-19960
2020-02-03 10:59:30 +01:00
Andy Wilkinson 886e7ba38c Merge branch '2.2.x'
Closes gh-19989
2020-01-30 15:10:35 +00:00
Andy Wilkinson a37c170376 Try to make CouchbaseAutoConfigurationIntegrationTests less flakey
Closes gh-19932
2020-01-30 15:10:13 +00:00
dreis2211 fac6f08ca3 Use new AssertJ duration assertions
See gh-19985
2020-01-30 08:14:49 +01:00
Stephane Nicoll b6c5c3a113 Polish
See gh-19802
2020-01-28 18:22:28 +01:00
Stephane Nicoll eb852f1ad6 Disable bean overriding by default in ApplicationContextRunner
For consistency with SpringApplication, this commit disables bean
overriding by default in ApplicationContextRunner. Bean overriding can
be enabled again using withAllowBeanDefinitionOverriding.

Closes gh-18019
2020-01-28 15:57:28 +01:00
Stephane Nicoll 0516520b7e Polish "Fix scope of CqlSessionBuilder bean"
See gh-19899
2020-01-28 14:12:31 +01:00
Dmytro Nosan c8105413b9 Fix scope of CqlSessionBuilder bean
See gh-19899
2020-01-28 13:49:20 +01:00
Stephane Nicoll 83b38599b1 Apply consistent timeout for Cassandra integration tests
Closes gh-19802
2020-01-28 10:46:47 +01:00
Madhura Bhave 84ea3d359b Increase timeout for Cassandra tests
Closes gh-19802
2020-01-27 16:37:50 -08:00
Stephane Nicoll ed14173865 Polish "Upgrade to Flyway 6.2.0"
See gh-19894
2020-01-27 15:20:08 +01:00
Kedar Joshi 0ae075efd5 Upgrade to Flyway 6.2.0
See gh-19894
2020-01-27 14:56:04 +01:00
Stephane Nicoll f0e93f0e1d Migrate Couchbase tests to ApplicationContextRunner 2020-01-27 13:52:49 +01:00
Stephane Nicoll a1e6a20915 Simplify default value for Spring Data Couchbase's typeKey
This commit hard codes the default value so that the annotation
processor picks it up. The default value is tested for consistency so
this is acceptable as providing the default value in the metadata
requires to hard code it anyway.
2020-01-27 13:52:49 +01:00
Stephane Nicoll af4fdf0d6d Polish "Add support for Spring Data Couchbase custom type key"
See gh-19789
2020-01-27 11:09:41 +01:00
Grudi Radev d1a44dfacd Add support for Spring Data Couchbase custom type key
See gh-19789
2020-01-27 11:08:40 +01:00
Stephane Nicoll 142a0cbb85 Fix warnings in spring-boot-autoconfigure's Kotlin test code
Closes gh-19877
2020-01-24 10:48:11 +01:00
Stephane Nicoll 0a6fa64ff9 Fix default value for spring.data.couchbase.contact-points
See gh-18621
2020-01-23 18:22:40 +01:00
Stephane Nicoll df7b3839a1 Add local-datacenter property for Cassandra
The Cassandra v4 driver does not longer have automatic local DC inference
from contact points. As a result, the "local-datacenter" property must be
set with the default load balancing policy and the contact points must
be of that data center.

This commit adds a new property for the local datacenter so that it can
be specified without the use of a customizer.

Closes gh-19779
2020-01-23 18:16:05 +01:00
Stephane Nicoll 95be419527 Use Class.forName rather than ClassLoader.loadClass
This commit changes uses of ClassLoader.loadClass to Class.forName for
consistency with what was initiated in #19342 and better compatibility
with GraalVM.

Closes gh-19824
2020-01-23 10:47:53 +01:00
Scott Frederick 462f5635d6 Reinstate JobLauncherCommandLineRunner
This class was mistakenly marked as deprecated in 2.2.0 instead of deprecated
in 2.3.0. This resulted in the class being deleted as part of the 2.3.0
cleanup.

Putting it back in place now with the correct deprecation noted.

Closes gh-19861
2020-01-22 18:48:55 -06:00
Phillip Webb e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
2020-01-22 16:02:38 -08:00
Phillip Webb 0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
2020-01-22 15:49:52 -08:00
Scott Frederick ed6fbc6bec Remove Spring Cloud Connectors auto-config/starter
The Spring Cloud Connectors project has been deprecated in favor of the
Java CFEnv project. The Boot auto-configuration and starter that support
Connectors were deprecated in Boot 2.2.

This commit removes the Connectors auto-configuration, starter,
and dependency management.

Closes gh-19798
2020-01-22 17:06:32 -06:00
Scott Frederick 9ff50f903f Default spring.datasource.generate-unique-name to true
This change ensures that each test in a test suite that shares an
application context gets a unique embedded database, to prevent
inconsistent embedded database state between tests.

Closes gh-16747
2020-01-22 15:41:40 -06:00
Scott Frederick 288889685d Change default BootstrapMode for JPA repositories
Change the default `BootstrapMode` for auto-configured `JpaRepositories`
to `BootstrapMode.DEFERRED` to allow the initialization of
`EntityManagerFactory` to be parallelized for increased startup efficiency.

Prior to this change, the default BootstrapMode for all auto-configured
Spring Data repositories was `BootstrapMode.DEFAULT`.

Closes gh-16230
2020-01-22 10:55:51 -08:00
Stephane Nicoll 4d70f58bc8 Polish "Upgrade to Infinispan 10.1.1.Final"
See gh-19790
2020-01-21 14:53:09 +01:00
Scott Frederick c4592e7df8 Remove deprecated Joda-Time support
See gh-19699
2020-01-16 14:48:46 +01:00
Scott Frederick 8f102aee68 Remove deprecated 2.2 code
See gh-19699
2020-01-16 14:44:52 +01:00
Andy Wilkinson 443d1a6a21 Upgrade to Liquibase 3.8.5
Closes gh-19754
2020-01-15 15:09:58 +00:00
Andy Wilkinson 714a187d8f Rework dep mgmt again to avoid consumers picking up strict constraints
This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.

See gh-19609
2020-01-15 12:33:18 +00:00
Stephane Nicoll dee71f064b Harmonize Cassandra bean names 2020-01-14 15:22:16 +01:00
Andy Wilkinson aefe52e4d0 Revert "Rework dep management to avoid consumers picking up strict constraints"
This reverts commit b34a311d02 as,
having disabled the publishing of Gradle's module metadata (4f75ab5),
the changes are no longer needed.

See gh-19609
2020-01-14 12:15:53 +00:00
Stephane Nicoll 246f5ce8eb Polish Cassandra v4 support 2020-01-14 12:25:44 +01:00
Brian Clozel 711391cf2f Move spring.http.* config properties namespace
Closes gh-18827
2020-01-14 10:45:31 +01:00
Stephane Nicoll 7f6b01c3d2 Make sure Redis cache prefix includes cache name
This commit maps 'spring.cache.redis.key-prefix' to the new
'prefixCacheNameWith' method introduced in Spring Data Neumann. This
makes sure that the configured prefix includes the cache name.

Closes gh-16676
2020-01-14 09:09:33 +01:00
Phillip Webb 862462b791 Update copyright year of changed files 2020-01-13 17:04:19 -08:00
Phillip Webb 1e5ba09a3e Merge branch '2.2.x' 2020-01-13 17:03:51 -08:00
Phillip Webb 15652ae4c1 Update copyright year of changed files 2020-01-13 16:47:17 -08:00
Phillip Webb 3cfbfebbb1 Merge branch '2.1.x' into 2.2.x 2020-01-13 16:45:40 -08:00
Phillip Webb 9bd49562fe Update copyright year of changed files 2020-01-13 14:09:11 -08:00
Scott Frederick c789592e26 Remove support for deprecated Elasticsearch Jest client
Closes #19676
2020-01-13 21:03:12 +01:00
Andy Wilkinson b34a311d02 Rework dep management to avoid consumers picking up strict constraints
Previously, enforcedPlatform dependencies were using to pull in the
constraints defined in spring-boot-dependencies and
spring-boot-parent and applied them strictly so that the constrained
version had to be used. This worked as intended in Spring Boot's own
build but incorrectly enforced those same strict version requirements
on external consumers of Spring Boot's modules.

This commit reworks how Spring Boot defines its internal dependency
management so that platform dependencies are exposed to external
consumers while enforced platform dependencies are using internally.

See gh-19609
2020-01-13 19:59:56 +00:00
Stephane Nicoll 405b9b7f93 Merge branch '2.2.x'
Closes gh-19693
2020-01-13 18:50:46 +01:00
dreis2211 852659684b Fix typo in NoSuchBeanDefinitionFailureAnalyzer exception
See gh-19690
2020-01-13 18:48:35 +01:00
Brian Clozel b780e5247c Remove support for Elasticsearch transport client
The Elasticsearch transport client has been deprecated since Spring Boot
2.2.0 and is about to be removed from Spring Data Elasticsearch and
Elasticsearch itself in their next major releases.

The available REST client support variants are now the preferred way of
using Elasticsearch features.

Closes gh-19668
2020-01-13 16:00:18 +01:00
Stephane Nicoll ca1710ee56 Upgrade to Apache Cassandra 4.3.1
See gh-19588
2020-01-13 15:12:41 +01:00
Stephane Nicoll d282eb619f Upgrade to Elasticsearch 7.5.1
See gh-19588
2020-01-13 15:12:41 +01:00
Brian Clozel 0f567c879d Auto-configure HTTP client builders as Lazy
Prior to this commit, HTTP client builders auto-configured by Spring
Boot would be eagerly instantiating resources, even if those were not
used by the application.

This commit makes the `RestTemplateBuilder` bean as Lazy.
`WebClient.Builder` was already a prototype bean, but some of its
dependencies could consume resources, like the `HttpClientConnector` and
the related infrastructure. This commit makes those pieces lazy.

Note that since those components are meant to help instantiate actual
HTTP clients for application components, making them lazy won't make any
difference at runtime since they'll be used during context refresh, or
they won't be used at all.

Closes gh-19549
2020-01-10 22:15:29 +01:00
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
2020-01-10 14:15:35 +00:00
Madhura Bhave 6d0b4351f4 Merge branch '2.2.x'
Closes gh-19582
2020-01-08 13:54:13 -08:00
Madhura Bhave 437941cc51 Improve diagnostics when using `@ConstructorBinding` on a Kotlin class
Closes gh-19312
2020-01-08 13:53:47 -08:00
Stephane Nicoll e5c1f3133a Harmonize cassandra tests 2020-01-08 14:57:52 +01:00
Stephane Nicoll 6ced89490c Polish 2020-01-08 14:34:33 +01:00
Stephane Nicoll bc066d279b Polish cassandra tests
See gh-18019
2020-01-08 14:22:48 +01:00
Andy Wilkinson 10ba17c390 Merge branch '2.2.x'
Closes gh-19571
2020-01-08 11:44:40 +00:00
Andy Wilkinson 6d8f07d899 Merge branch '2.1.x' into 2.2.x
Closes gh-19570
2020-01-08 11:42:56 +00:00
Andy Wilkinson bdffa860d9 Increase startup timeout for Docker containers
Closes gh-19569
2020-01-08 11:39:36 +00:00
Madhura Bhave c9ad3564d9 Merge branch '2.2.x'
Closes gh-19562
2020-01-07 14:29:45 -08:00
Madhura Bhave 82dc7bcc90 HypermediaAutoConfiguration should back off when Spring MVC absent
Fixes gh-19392
2020-01-07 14:28:58 -08:00
Madhura Bhave 87dd11502a Refactor HypermediaAutoConfigurationTests 2020-01-07 14:28:09 -08:00
Brian Clozel 2f78c72f92 Avoid 406 Not Acceptable for error pages
Prior to this commit, the `ErrorController` would override the original
error response status if the error map cannot be written due to content
negotiation with the HTTP client. In that case, the error handling
infrastructure returns a `406 Not Acceptable` response.

This commit improves the `ErrorController` so that
`HttpMediaTypeNotAcceptableException` instances thrown by that
controller are not returned as is but instead we write the error
response with an empty body and the original HTTP error status.

Fixes gh-19545
See gh-19522
2020-01-06 18:08:35 +01:00
Stephane Nicoll ee7555750e Add ComponentScan#nameGenerator alias on @SpringBootApplication
This commit allows to customize the default BeanNameGenerator for
scanned components using @SpringBootApplication.

Closes gh-19346
2020-01-06 16:33:38 +01:00
Madhura Bhave bb55bad170 Merge branch '2.2.x'
Closes gh-19529
2020-01-03 14:27:31 -08:00