Commit Graph

1867 Commits

Author SHA1 Message Date
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
Brian Clozel 1320c44a25 Use RBAC credentials for Couchbase cluster info
Prior to this commit, the Couchbase auto-configuration would use the
bucket credentials when RBAC is configured. This commit ensures that
RBAC is used in that case.

This commit also adds new configuration properties to customize the
bootstrap ports for Couchbase:

* `spring.couchbase.env.bootstrap.http-direct-port`
* `spring.couchbase.env.bootstrap.http-ssl-port`

Fixes gh-19393
2020-01-03 09:45:44 +01:00
Stephane Nicoll c3ab4b875a Merge branch '2.2.x'
Closes gh-19504
2020-01-01 13:13:06 +01:00
Stephane Nicoll 7d36599343 Polish "Fix outdated reference in ArtemisConfigurationCustomizer javadoc"
See gh-19503
2020-01-01 13:11:39 +01:00
Ochieng Olanga c6f7d12270 Fix outdated reference in ArtemisConfigurationCustomizer javadoc
See gh-19503
2020-01-01 13:10:34 +01:00
Stephane Nicoll 6fc52b0563 Polish 2020-01-01 09:16:53 +01:00
Stephane Nicoll a9b0b78cb2 Upgrade to Flyway 6.1.3
Closes gh-19266
2019-12-31 10:47:41 +01:00
Victor Ferrer 1d900f67e7 FilteringSpringBootCondition uses Class.forName instead of classLoader
See gh-19490
2019-12-31 09:42:06 +01:00
Stephane Nicoll 61ae4fbc04 Merge branch '2.2.x' 2019-12-31 09:41:48 +01:00
Stephane Nicoll 1de30f0d00 Polish 2019-12-31 09:40:04 +01:00
Stephane Nicoll 3b6f21d997 Merge branch '2.2.x'
Closes gh-19486
2019-12-30 17:01:53 +01:00
Stephane Nicoll 07a21ec601 Harmonize property visibility in Saml2RelyingPartyProperties
Closes gh-19194
2019-12-30 16:53:23 +01:00
Stephane Nicoll 334f3e08ae Fix formatting 2019-12-30 15:08:50 +01:00
Stephane Nicoll 5f178db49b Polish test setup
This commit polishes a test configuration to avoid registering a mock
for the same bean twice.
2019-12-30 14:52:49 +01:00
Stephane Nicoll cf740add85 Fix component scan test setup
This commit fixes the setup of tests using component scan. Previously,
a configuration used an include filter to only include a particular
configuration class in a given package. Unfortunately, include filters
do not prevent regular filters by default and the definition did not
have the intended behaviour.

This commit disables default filters so that only the specified include
filter is applied.
2019-12-30 14:51:51 +01:00
Stephane Nicoll bb5e09882a Extract RabbitTemplate auto-configuration in a configurer
This commit movers the auto-configuration of RabbitTemplate to a
dedicated class that can be reused to create additional template with
similar settings.

CLoses gh-19440
2019-12-28 10:56:04 +01:00
Stephane Nicoll 015714c1d6 Merge branch '2.2.x'
See gh-19474
2019-12-28 10:52:30 +01:00
Stephane Nicoll 85667ba165 Merge branch '2.1.x' into 2.2.x
See gh-19473
2019-12-28 10:52:01 +01:00
Stephane Nicoll c0f1aaebb6 Fix Tomcat's maxConnections default value
Closes gh-19472
2019-12-28 10:51:42 +01:00
Stephane Nicoll 2c1e81adf0 Polish 2019-12-26 10:42:40 +01:00
Stephane Nicoll 5b1a622195 Harmonize class visibility
Closes gh-19414
2019-12-23 17:07:13 +01:00
Stephane Nicoll 58a28cf54c Merge branch '2.2.x'
Closes gh-19444
2019-12-23 16:54:57 +01:00
Stephane Nicoll c9bb17f444 Merge branch '2.1.x' into 2.2.x
Closes gh-19443
2019-12-23 16:54:29 +01:00
Stephane Nicoll c6dab447cd Fix visibility of inner classes of ServletWebServerFactoryConfiguration
Closes gh-19395
2019-12-23 16:44:52 +01:00
Stephane Nicoll 68dc850a82 Execute batch jobs with ApplicationRunner
This commit migrates JobLauncherCommandLineRunner to an
ApplicationRunner implementation. The latter allows to parse option
arguments (i.e. `--spring.something=value`) and makes it easy to ignore
arguments that are not meant to be passed to batch jobs.

Closes gh-19442
2019-12-23 16:19:28 +01:00
Johnny Lim 6efa98951d Polish LdapAutoConfigurationTests
See gh-19437
2019-12-23 08:53:10 +01:00
Stephane Nicoll 5031e6182b Merge branch '2.2.x'
Closes gh-19435
2019-12-22 08:53:13 +01:00
Filip Hrisafov bb5c151ee0 Disable SerializationFeature.WRITE_DURATIONS_AS_TIMESTAMPS by default
See gh-19352
2019-12-22 08:52:07 +01:00
Stephane Nicoll fde06f4edd Merge branch '2.2.x'
Closes gh-19434
2019-12-22 08:44:47 +01:00
Stephane Nicoll 2171e7a425 Merge branch '2.1.x' into 2.2.x
Closes gh-19433
2019-12-22 08:44:18 +01:00
Tadaya Tsuyukubo 294267d2e0 Fix typo on ConditionMessage
See gh-19354
2019-12-22 08:40:43 +01:00
dreis2211 4b10462464 Fix compilation error
See gh-19423
2019-12-20 17:10:39 +00:00