Commit Graph

1898 Commits

Author SHA1 Message Date
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 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
Madhura Bhave c12a3f4172 Support explicitly setting forward headers strategy to NONE
Prior to this commit, there was no distinction between explicitly setting
forward headers strategy to a value of NONE and not setting it at all.
This meant that in a cloud environment, a cloud provider was always checked
to see if it was active and using forward headers and there was no way to
prevent that.

This commit changes the default value of the property to null so that there
is a way to determine if the property was explicitly set to NONE.

Fixes gh-19333
2020-01-03 14:19:48 -08:00
Brian Clozel cc154bbefb 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-19522
2020-01-03 14:51:53 +01:00
Brian Clozel c2f8741e2e Merge branch '2.2.x'
Closes gh-19517
2020-01-03 09:46:43 +01:00