Commit Graph

2203 Commits

Author SHA1 Message Date
Stephane Nicoll cc3575b3f4 Merge branch '2.1.x' into 2.2.x 2020-06-09 16:26:44 +02:00
Stephane Nicoll 9a457527fd Polish test 2020-06-09 16:00:50 +02:00
Andy Wilkinson 8155cc5f23 Merge branch '2.2.x' into 2.3.x
Closes gh-21786
2020-06-09 11:02:23 +01:00
Andy Wilkinson a0f29edd4d Always initialize stompWebSocketHandlerMapping eagerly
Previously, when lazy initialization was enabled, STOMP-based WebSocket
messaging would not work as the stompWebSocketHandlerMapping bean was
not initialized and CONNECT requests would go unanswered.

This commit adds a LazyInitializationExcludeFilter that causes the
stompWebSocketHandlerMapping bean to always be initialized eagerly.
This triggers initialization of the WebSocket transport allowing
requests to be received and processed.

Fixes gh-19611
2020-06-09 11:02:02 +01:00
Scott Frederick 73aff08535 Improve tests for BasicErrorController
This commit improves the tests for BasicErrorController by decoupling
coverage for the include-message and include-binding-errors
parameters to ensure the options operate properly independent of
each other.

See gh-21702
2020-06-08 15:00:55 -05:00
Aurdo e2e52a11cc Fix BasicErrorController include parameter parsing
This commit fixes an error in BasicErrorController where the wrong
property was referenced for binding error inclusion.

See gh-21702
2020-06-08 15:00:55 -05:00
Phillip Webb ddbecf62b3 Polish 'Fix Mustache to not ignore native fetcher'
See gh-21060
2020-06-08 11:10:57 -07:00
Dave Syer 5199c11e37 Fix Mustache to not ignore native fetcher
Alter the logic of `MustacheEnvironmentCollector` so that the
native fetcher is always consulted if it exists.

When the context is a map (as it is in a web View for instance) you
can't assume a non-null fetcher actually contains the property you are
searching for.

See gh-21060
2020-06-08 11:02:04 -07:00
Andy Wilkinson 82b531b49e Merge branch '2.2.x' into 2.3.x 2020-06-08 11:35:53 +01:00
Andy Wilkinson 8da1e3addb Merge branch '2.1.x' into 2.2.x 2020-06-08 11:35:10 +01:00
Andy Wilkinson 6a9450ee8b Polish 2020-06-08 11:34:56 +01:00
Phillip Webb f8982bdc14 Polish 'Support userInfo in elasticsearch URI'
See gh-21381
2020-06-07 11:56:18 -07:00
Evgeniy Cheban a72179aa4f Support userInfo in elasticsearch URI
See gh-21381
2020-06-07 10:38:41 -07:00
Phillip Webb abaca95467 Merge branch '2.2.x' into 2.3.x
Closes gh-21744
2020-06-07 10:27:35 -07:00
Phillip Webb bfe1c281f0 Merge branch '2.1.x' into 2.2.x
Closes gh-21743
2020-06-07 10:25:33 -07:00
Phillip Webb 70e0a27949 Drop the use of the term "white list"
Closes gh-21737
2020-06-07 10:22:35 -07:00
Phillip Webb 0a05b4c9fd Update copyright year of changed files 2020-06-05 15:36:09 -07:00
Stephane Nicoll 400a168ce9 Merge branch '2.2.x' into 2.3.x
Closes gh-21720
2020-06-05 16:41:24 +02:00
dreis2211 9bb22ffb69 Remove usages of deprecated Connector.setAttribute()
See gh-21671
2020-06-05 16:32:42 +02:00
Madhura Bhave 1f28141f3e Use the right property in test 2020-06-01 15:15:53 -07:00
dreis2211 b498d3903f Upgrade to Testcontainers 1.14.2
See gh-21581
2020-05-27 14:49:09 +02:00
Stephane Nicoll 9cf448863a Restore RestClientBuilderCustomizer in its original location
This commit restores RestClientBuilderCustomizer in the rest package in
a deprecated fashion so that the upgrade from 2.2 is smoother.

Closes gh-21572
2020-05-26 16:55:09 +02:00
Toshiaki Maki b4817c85b1 Fix default value for spring.data.jpa.repositories.bootstrap-mode
See gh-21492
2020-05-25 15:11:17 +02:00
Stephane Nicoll b9a1a70fcc Merge branch '2.2.x'
Closes gh-21562
2020-05-25 14:59:19 +02:00
Stephane Nicoll 77981ac2ae Polish "Use the container IP address for tests using TestContainer"
See gh-21480
2020-05-25 14:29:24 +02:00
olivier lamy 0c2bf70bb8 Use the container IP address for tests using TestContainer
See gh-21480
2020-05-25 14:03:18 +02:00
Brian Clozel a12a3054c9 Optimize UrlPathHelper configuration for Spring MVC
Prior to this commit, Spring Boot would auto-configure Spring MVC and
would keep the default `UrlPathHelper` configuration.
Since Spring Boot is in charge of configuring the `DispatcherServlet`
and its mapping, it is in a position to optimally configure the
`UrlPathHelper` depending on the chosen mapping.

This commit sets the `alwaysUseFullPath` property of `UrlPathHelper` if
the Servlet mapping is `"/"`. This is more efficient since this
configuration requires less processing of the request path.

Closes gh-21499
2020-05-22 18:50:24 +02:00
Brian Clozel 525e03d3b5 Add welcome page support for Spring WebFlux
This commit adds the support for static and templated welcome pages with
Spring WebFlux. The implementation is backed by a `RouterFunction`
that's serving a static `index.html` file or rendering an `index` view.

Closes gh-9785
2020-05-22 14:20:06 +02:00
Phillip Webb eb3b0f82a3 Use http liquibase XSDs
Update the lquibase test to use `http://` rather than `https://` so that
it can be resolved from the local jar.
2020-05-14 17:55:10 -07:00
Madhura Bhave 5acd115cb3 Add redis sentinel password property
Closes gh-21353
2020-05-13 16:55:51 -07:00
Phillip Webb 038ae93406 Update copyright year of changed files 2020-05-13 16:48:51 -07:00
Madhura Bhave 4d521e712f Merge branch '2.2.x' 2020-05-13 13:55:44 -07:00
Madhura Bhave 27ada029b5 Revert "Expose property to configure OAuth2 provider configurationMetadata"
This reverts commit 7b79029949.

See gh-21375
2020-05-13 13:53:46 -07:00
Phillip Webb 6a1f61c1bf Merge branch '2.2.x' 2020-05-13 12:23:10 -07:00
Phillip Webb daed512076 Restore getUseRelativeRedirects in deprecated form
Restore the `getUseRelativeRedirects` method with a `Boolean` object
result and introduce `isUseRelativeRedirects` for the primitive boolean
variant.

See gh-20796
2020-05-13 11:36:24 -07:00
Stephane Nicoll a5f826fc78 Fix typo 2020-05-13 15:57:29 +02:00
Madhura Bhave 453ca01338 Merge branch '2.2.x'
Closes gh-21429
2020-05-12 13:43:17 -07:00
Madhura Bhave 7b79029949 Expose property to configure OAuth2 provider configurationMetadata
Closes gh-21375
2020-05-12 13:42:03 -07:00
Andy Wilkinson 0bb687717c Auto-configure a lifecycle processor with configurable timeout
Closes gh-21347
2020-05-12 19:59:52 +01:00
Andy Wilkinson 240898121f Use SmartLifecycle for graceful web server shutdown
Closes gh-21325
2020-05-12 19:59:52 +01:00
Johnny Lim 6022d4cac7 Fix ClientHttpConnectorConfigurationTests.shouldApplyHttpClientMapper()
See gh-21390
2020-05-12 17:13:27 +02:00
Stephane Nicoll deb2322457 Remove wrong replacement key in deprecated metadata 2020-05-12 15:37:50 +02:00
Stephane Nicoll 8c4f185b98 Remove outdated metadata for spring.data.cassandra.port
Closes gh-21418
2020-05-12 09:56:49 +02:00
Scott Frederick 158933c3e5 Improve API of ErrorAttributes and DefaultErrorAttributes
This commit improves the backward-compatibility of the ErrorAttributes
interfaces by providing a default implementation of a new method. It
also encapsulates several parameters that control the inclusion or
exclusion of error attributes into a new ErrorAttributeOptions type to
make it easier and less intrusive to add additional options in the
future. This encapsulation also makes the handling of the
includeException option more similar to other options.

Fixes gh-21324
2020-05-11 15:36:24 -05:00
Stephane Nicoll 09815cc99d Merge branch '2.2.x'
Closes gh-21352
2020-05-07 14:19:41 +02:00
Stephane Nicoll 31f9a965f0 Merge branch '2.1.x' into 2.2.x
Closes gh-21351
2020-05-07 14:12:53 +02:00
Stephane Nicoll 1a4f6df0a3 Upgrade to Spring Ldap 2.3.3.RELEASE
Closes gh-21342
2020-05-07 14:11:24 +02:00
Madhura Bhave 8e7f816f48 Merge branch '2.2.x'
Closes gh-21344
2020-05-06 16:37:25 -07:00
Madhura Bhave 5583f64b1f Add tests to verify Jetty's thread pool defaults match server defaults
Closes gh-21213
2020-05-06 16:35:00 -07:00
Madhura Bhave 01404aa27b Merge branch '2.2.x'
Closes gh-21343
2020-05-06 16:00:24 -07:00
Madhura Bhave f29bce657e Harmonize default for server.tomcat.use-relative-redirects
Prior to this commit, the property was a Boolean with a null default.
If it was explicitly set by the user, a context customizer would use
that value to set it on the context. However, if it was not set, the default
wouldn't be tomcat's default but `false` because it was explicitly set to
`false` in `TomcatServletWebServerFactory`. This commit defaults the property
itself to `false` so that the default is more obvious to the user.

Fixes gh-20796
2020-05-06 15:54:27 -07:00
Phillip Webb d52bf83ab2 Polish 2020-04-30 16:40:05 -07:00
Andy Wilkinson 04c7132eb3 Rename customize to reflect type that it customizes
See gh-20961
2020-04-30 19:43:52 +01:00
dreis2211 dd11b8adba Fix checkstyle violation
See gh-21266
2020-04-30 12:43:51 +02:00
Andy Wilkinson 1abe0f16d0 Apply gridFsDatabase to auto-configured ReactiveGridFsTemplate
Closes gh-18284
2020-04-30 10:46:10 +01:00
Madhura Bhave 6007a71b9c Polish "Add support for customizing RSocketMessageHandler"
See gh-21081
2020-04-29 17:15:09 -07:00
Aarti Gupta 456d6e78fe Add support for customizing RSocketMessageHandler
See gh-21081
2020-04-29 17:11:19 -07:00
Scott Frederick a30740f8d2 Separate server properties for message and errors
Prior to this commit, there was a property server.error.include-details
that allowed configuration of the message and errors attributes in a
server error response.

This commit separates the control of the message and errors attributes
into two separate properties named server.error.include-message and
server.error.include-binding-errors. When the message attribute is
excluded from a servlet response, the value is changed from a
hard-coded text value to an empty value.

Fixes gh-20505
2020-04-29 17:56:47 -05:00
Andy Wilkinson d65d951318 Polish "Add support for customizing Spring Session's cookie serializer"
See gh-20961
2020-04-29 20:53:58 +01:00
Vedran Pavic 32454b83b4 Add support for customizing Spring Session's cookie serializer
This commit introduces a CookieSerializerCustomizer callback that
allows the customization of the auto-configured
DefaultCookieSerializer bean. This is particularly useful for
configuring cookie serializer's capabilities, such as SameSite, that
are not supported by the Servlet API and therefore not exposed via
server.servlet.session.cookie.* properties.

See gh-20961
2020-04-29 20:53:58 +01:00
Stephane Nicoll d16074d8fd Bind and unbind Kafka metrics as consumers and producers come and go
Fixes gh-21008

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
2020-04-29 17:53:08 +01:00
Brian Clozel 692a8c47cc Rename property for registering default Servlet
As a follow-up for gh-21214, this commit renames the property to:

`"server.servlet.register-default-servlet=false"`

Closes gh-21214
2020-04-29 18:42:50 +02:00
Brian Clozel c7c01f8ab4 Add property for registering default Servlet
This commit adds a new configuration property for configuring the
registration of the default Servlet in Servlet containers.

`"server.servlet.default-servlet.registered=false"`

The default of this property is still `true`, as it's been the case in
previous releases.

Closes gh-21214
2020-04-29 18:02:33 +02:00
dreis2211 c1c90b11b8 Fix some deprecations
See gh-21212
2020-04-29 15:10:30 +02:00
Andy Wilkinson d167bb472d Allow base packages to be specified on @AutoConfigurationPackage
Closes gh-19023
2020-04-29 13:00:22 +01:00
Andy Wilkinson d63e492906 Add support for enabling ISO date, time, and date-time formatting
Closes gh-20579
2020-04-29 11:47:33 +01:00
Andy Wilkinson 95e5d4e045 Polish "Enable users to provide custom time and datetime formats"
See gh-18772
2020-04-29 11:46:56 +01:00
Daniel Knittl-Frank 69b51cd64d Enable users to provide custom time and datetime formats
Extend WebFlux and WebMvc properties with timeFormat and
dateTimeFormat properties to allow users to customize format of
LocalTime and LocalDateTime instances.

See gh-18772
2020-04-29 11:46:24 +01:00
Stephane Nicoll 6921fdacac Expand configuration class eager filtering to imports
Previously, only root auto-configuration classes could be excluded
eagerly via an AutoConfigurationImportFilter. Any configuration class
loaded as a result of processing a particular auto-configuration were
parsed and checked as usual.

This commit makes use of the `getExclusionFilter` callback to expand
this filter to all candidates that are considered. The annotation
processor has also be expanded to generate metadata for non-root
configuration classes.

Closes gh-12157
2020-04-29 10:45:28 +02:00
Andy Wilkinson 69a25e4d80 Stop relying on transitive com.nimbusds:oauth2-oidc-sdk dependency 2020-04-29 09:17:57 +01:00
Phillip Webb ad1248e4ec Replace "folder" with "directory"
Consistently use the term "directory" instead of "folder"

Closes gh-21218
2020-04-28 19:20:24 -07:00
Brian Clozel dac62476a0 Merge branch '2.2.x'
Closes gh-21208
2020-04-28 11:33:50 +02:00
Brian Clozel a63ab468a3 Upgrade to RSocket 1.0.0-RC7
This commit upgrades to RSocket 1.0.0-RC7.
This new RC brings API changes we have to adapt to. As of this commit,
we're introducing a new `RSocketServerCustomizer` which replaces the now
deprecated `ServerRSocketFactoryProcessor`.

Closes gh-21046
2020-04-28 11:09:37 +02:00
Brian Clozel b337f67f93 Add ReactorNettyHttpClientMapper
This new customizer-like interface make it possible to configure the
Reactor Netty `HttpClient` that is going to be used by the
`WebClient.Builder` provided by Spring Boot.

Closes gh-21135
2020-04-26 22:10:39 +02:00
dreis2211 5eb5bf0a2d Polish
See gh-21009
2020-04-25 08:54:47 +02:00
Stephane Nicoll 85e9f713b0 Update copyright year of changed files
See gh-21007
2020-04-25 08:50:51 +02:00
Johnny Lim 29717423a3 Remove this keyword on member method invocations
See gh-21007
2020-04-25 08:49:44 +02:00
Andy Wilkinson d5b944140a Attempt to stabilise CouchbaseAutoConfigurationIntegrationTests
Starting the CouchbaseContainer fails intermittently when creation
of the primary index for the bucket fails with a read timeout. The
test doesn't require a primary index for the bucket so this commit
disables it creation in the hope that it will help to stabilise the
test.
2020-04-24 16:21:08 +01:00
Andy Wilkinson dc75ca3942 Avoid capturing TCCL when creating DefaultResourceLoaders
Previously, DefaultResourceLoader instances were created using the
default constructor. This causes the resource loader to capture the
TCCL that was in place at that time. This can lead to a class loader
leak if the resource loader is referenced directly or indirectly from
a static field of a class loaded by a different class loader.

This commit updates the creation of DefaultResourceLoader instances
in main code so that the resource load will use the class loader of
the creating class. In almost all cases this will be the same class
loader as was the thread context class loader that was being captured
so the change in behavior is minimal. Crucially, it will still address
the situation where the TCCL was different.

Note the DevTools' ApplicationContextResourceLoader has been updated
to explicitly use the TCCL. This ensures that it uses the restart
class loader which is required for DevTools to function correctly.

Fixes gh-20900
2020-04-24 13:29:29 +01:00
Andy Wilkinson d53be18582 Deprecate support for Bitronix
Closes gh-20823
2020-04-24 11:37:44 +01:00
Stephane Nicoll ddcd1bc7bb Remove metadata for configuration keys that were removed in 2.0
Closes gh-19706
2020-04-23 16:14:13 +02:00
Stephane Nicoll 623fbcbf8c Polish 2020-04-23 15:20:47 +02:00
Stephane Nicoll 1019dbbc47 Merge branch '2.2.x'
Closes gh-21100
2020-04-23 15:00:22 +02:00
Stephane Nicoll 8ac3ab5551 Add missing metadata for removed configuration keys
Closes gh-20846
2020-04-23 14:39:10 +02:00
Stephane Nicoll 6c02daf2bc Merge branch '2.2.x'
Closes gh-21098
2020-04-23 14:12:37 +02:00
Stephane Nicoll 311952730e Merge branch '2.1.x' into 2.2.x
Closes gh-21097
2020-04-23 14:07:31 +02:00
Stephane Nicoll 291165f060 Order additional metadata according to lexicographic order
Closes gh-21095
2020-04-23 13:58:49 +02:00
Phillip Webb 56711d678a Merge branch '2.2.x'
Closes gh-21083
2020-04-22 11:59:22 -07:00
Phillip Webb 102729b5e1 Merge branch '2.1.x' into 2.2.x
Closes gh-21082
2020-04-22 11:58:39 -07:00
Phillip Webb b3d33754a5 Remove outdated FIXMEs from tests
Closes gh-19782
2020-04-22 11:55:35 -07:00
Phillip Webb bf41da5322 Update copyright year of changed files 2020-04-21 18:12:27 -07:00
Phillip Webb e83c3b87c0 Merge branch '2.2.x'
Closes gh-21071
2020-04-21 11:45:05 -07:00
Phillip Webb 7d0b14fe1c Merge branch '2.1.x' into 2.2.x
Closes gh-21070
2020-04-21 11:43:09 -07:00
Phillip Webb 6011470ba6 Auto-configure cors on WelcomePageHandlerMapping
Update `WebMvcAutoConfiguration` to automatically apply cors
configuration to the `WelcomePageHandlerMapping`.

Fixes gh-21048
2020-04-21 11:40:26 -07:00
Stephane Nicoll e26f3e2a65 Review Cassandra's timeout options
This commit reviews the current timeout options. It creates a connection
and request sub-namespace to separate concerns a bit more.

Closes gh-19673
2020-04-21 17:29:38 +02:00
Brian Clozel f103966743 Polish
See gh-20994
2020-04-21 15:51:11 +02:00
Vedran Pavic f701d97b92 Improve Elasticsearch RestClient customization capabilities
At present, RestClientBuilderCustomizer allows general customization of RestClientBuilder.
This is troublesome for users that want to customize `HttpAsyncClientBuilder` and
`RequestConfig.Builder` since those are set on the `RestClientBuilder`. By customizing
those two builders user lose out on Spring Boot's support for binding username, password,
connection-timeout and read-timeout properties from `"spring.elasticsearch.rest"` namespace.

This commit enhances the `RestClientBuilderCustomizer` with support for customizing
`HttpAsyncClientBuilder` and `RequestConfig.Builder` by providing additional `customize`
methods that accept the aforementioned builders. Both new methods are optional as they have
no-op default implementations.

See gh-20994
2020-04-21 15:50:59 +02:00
Andy Wilkinson 3605235c67 Merge branch '2.2.x'
Closes gh-21041
2020-04-20 17:12:47 +01:00
Andy Wilkinson 439d9beecb Test that gridFsDatabase is honored by auto-configured GridFsTemplate
Closes gh-21039
2020-04-20 17:09:37 +01:00
Stephane Nicoll 415dcd899d Configure Cassandra's request throttling
Closes gh-19674
2020-04-20 15:56:09 +02:00