Commit Graph

2362 Commits

Author SHA1 Message Date
Scott Frederick b7fdf8fe87 Preserve user-provided values in MongoClientSettings
Prior to this commit, values from MongoProperties would always
overwrite matching fields in MongoClientSettings. This commit
preserves all values in MongoClientSettings if the client app
provides the MongoClientSettings bean, and only overwrites from
MongoProperties if no MongoClientSettings bean is provided.

Fixes gh-22321
2020-08-17 16:07:40 -05:00
Stephane Nicoll 8c0318edc7 Polish "Consider RecordFilterStrategy in Kafka auto-configuration"
See gh-22973
2020-08-17 13:54:20 +02:00
anshlykov f68dfde35e Consider RecordFilterStrategy in Kafka auto-configuration
See gh-22973
2020-08-17 13:37:00 +02:00
Madhura Bhave bbbbe8e4d2 Make security auto-configs back off when SecurityFilterChain present
Closes gh-22739
2020-08-14 12:24:25 -07:00
Stephane Nicoll d4ba55f8d6 Do not configure a ReactiveNeo4jTransactionManager
The current arrangement with Neo4j does not allow us to know for sure
that the user intends to use `@Transactional` for reactive or imperative
operations.

The main reason for that is that the only trigger for the reactive
auto-configuration is the presence of reactor on the classpath given
that the Neo4j driver ships with both styles in the same jar. And
reactor can be on the classpath for a number of reasons that are
unrelated to imperative access (typically `WebClient`).

This commits removes the auto-configuration of the
ReactiveNeo4jAutoConfiguration and makes sure that if the user defines
one, the regular `PlatformTransactionManager` backs off. This is
a temporarily situation until we can provide a better signal that the
user intends to primarily use imperative repositories.

Closes gh-22940
2020-08-13 16:57:51 +02:00
Andy Wilkinson 4398c71d12 Merge branch '2.3.x'
Closes gh-22938
2020-08-13 13:32:27 +01:00
Andy Wilkinson 8c4e6f766c Revert "Merge pull request #21060 from dsyer"
This reverts commit 6547ea56f9, reversing
changes made to e9e4a34e62.

Fixes gh-22039
2020-08-13 13:31:45 +01:00
Stephane Nicoll 947e484001 Merge branch '2.3.x'
Closes gh-22928
2020-08-13 09:44:26 +02:00
Stephane Nicoll d0662e824a Fix default value of server.jetty.accesslog.format
Closes gh-22921
2020-08-13 09:43:37 +02:00
Stephane Nicoll 25e08d2dee Restore handling of certain spring.data.neo4j.* properties
This commit switches the deprecation level of several properties in the
spring.data.neo4j namespace from error and warning. The server URI and
basic authentication can be used in a deprecated fashion to configure
the new neo4j driver.

Closes gh-22653
2020-08-12 14:07:44 +02:00
Phillip Webb 7838c7b072 Polish 'Support ConfigurationClassPostProcessor supplier'
See gh-22858
2020-08-11 12:31:02 -07:00
Dave Syer 06eff45a71 Support ConfigurationClassPostProcessor supplier
Update `SharedMetadataReaderFactoryContextInitializer` to optionally
support a `ConfigurationClassPostProcessor` provided via an instance
`Supplier`.

If the instance supplier is available then we can use that to set the
`MetadataReaderFactory` non-reflectively, instead of using a
`PropertyValue` (and the `BeanWrapper` eventually).

The previous behavior is left as a  fallback and without a change in
Spring Framework will continue to be the default for most applications.

See gh-22858
2020-08-11 12:31:02 -07:00
Andy Wilkinson abf6123bae Upgrade to Kafka 2.5.1
Closes gh-22868
2020-08-11 12:50:15 +01:00
Stephane Nicoll 5bd69fcd61 Merge branch '2.3.x'
Closes gh-22874
2020-08-11 13:40:21 +02:00
Stephane Nicoll dc4de06b35 Restore customization of the Couchbase cache manager
With the upgrade to the new Couchbase SDK and the related changes in
Spring Data Couchbase, CacheManagerCustomizer can no longer be used to
customize the Couchbase cache manager as it is an immutable class.

This commit introduces a dedicated callback for the
CouchbaseCacheManagerBuilder that is used by the auto-configuration and
update the documentation to refer to it with a sample usage.

Closes gh-22573
2020-08-11 13:32:17 +02:00
Andy Wilkinson ca93c8da94 Merge branch '2.3.x'
Closes gh-22856
2020-08-11 10:29:20 +01:00
Andy Wilkinson 1270af90c2 Only enable full path optimization when there's one DispatcherServlet
Previously, UrlPathHelper's full path optimization was enabled when
there was a dispatcher servlet mapped to /. The UrlPathHelper is used
across Spring MVC and if there are multiple dispatcher servlets they
all share the sample UrlPathHelper. This meant that any additional
dispatcher servlets mapping to locations other than / would not be able
to map requests correctly as the UrlPathHelper would use the full path,
ignoring the url mapping of the dispatcher servlet.

This commit updates the MVC auto-configuration so that use of the full
path is only enabled if there's a single dispatcher servlet
registration.

Fixes gh-22682
2020-08-11 09:59:06 +01:00
Andy Wilkinson 969dd35e45 Upgrade to Mockito 3.4.6
Closes gh-22838
2020-08-10 15:22:03 +01:00
Andy Wilkinson 4933b2688f Align with changes in latest Integration snapshots
See gh-22729
2020-08-07 20:11:01 +01:00
Phillip Webb f7f4ff0ac9 Update copyright year of changed files 2020-08-06 14:35:43 -07:00
Stephane Nicoll dac63fc3e5 Polish 2020-08-06 17:35:01 +02:00
Brian Clozel 4ef08425e6 Require RSocket 1.0+
This commit removes usage of methods and classes that were previously
deprecated in RSocket and Spring Framework and have been removed.

Closes gh-22764
2020-08-06 16:10:43 +02:00
Madhura Bhave f0ef47dfad Fix additional deprecations 2020-08-05 15:09:51 -07:00
Madhura Bhave 0d79bd08a6 Fix deprecations 2020-08-05 15:01:44 -07:00
Stephane Nicoll 516582f6d3 Merge branch '2.3.x'
Closes gh-22744
2020-08-05 18:05:07 +02:00
Stephane Nicoll 621f026499 Polish "Support configuration of entityId for a SAML Relying Party"
See gh-22258
2020-08-05 09:41:54 +02:00
Danilo Piazzalunga 5352ec1cba Support configuration of entityId for a SAML Relying Party
See gh-22258
2020-08-05 09:41:38 +02:00
Stephane Nicoll 589669d0cc Polish "Add support for selecting the Redis client to use"
See gh-22569
2020-08-05 09:21:52 +02:00
bono007 ac651442fa Add support for selecting the Redis client to use
See gh-22569
2020-08-05 09:05:06 +02:00
Andy Wilkinson bc44cd6705 Polish 2020-08-04 18:43:45 +01:00
Andy Wilkinson 7f53aef568 Upgrade to Kafka 2.6.0
Closes gh-22731
2020-08-04 18:14:23 +01:00
Stephane Nicoll 903dc93887 Polish "Add option to disable Redis Cluster dynamic sources refresh"
See gh-22571
2020-08-04 16:42:33 +02:00
bono007 3cfde51a8c Add option to disable Redis Cluster dynamic sources refresh
This commit adds an option to enable/disable the DynamicRefreshSources
setting on the Lettuce cluster toplogy refresh options.

See gh-22571
2020-08-04 16:42:33 +02:00
Stephane Nicoll 36fb86a110 Update to core r2dbc support
This commit adapts the auto-configuration for the new core r2dbc support
in Spring Framework and provides auto-configuration for
R2dbcEntityOperations.

Closes gh-22708
2020-08-04 16:00:29 +02:00
Brian Clozel 3354e0f030 Upgrade to Spring Security 5.4.0-SNAPSHOT
See gh-22668
2020-08-04 13:27:04 +02:00
Brian Clozel 94148e9b54 Upgrade to Couchbase Java Client 3.0.7
Closes gh-22688
2020-08-04 13:26:58 +02:00
Brian Clozel fb1234a22c Upgrade to Reactor 2020.0.0 SNAPSHOTs
See gh-22667
2020-08-04 13:26:47 +02:00
dreis2211 e49e2dfff1 Use Supplier variants of Assert methods
See gh-22699
2020-08-03 15:06:13 +02:00
Stephane Nicoll 9bc71fe44f Polish "Upgrade to Spring Data Neo4j 6"
See gh-22299
2020-07-29 19:36:42 +02:00
Gerrit Meier 15cd343737 Upgrade to Spring Data Neo4j 6
See gh-22299
2020-07-29 18:58:08 +02:00
Stephane Nicoll 5777aa5615 Start building against Spring Data 2020.0.0 snapshots
See gh-22647
2020-07-29 18:58:08 +02:00
Andy Wilkinson 3b54fe20a8 Merge branch '2.3.x'
Closes gh-22642
2020-07-29 14:10:50 +01:00
Andy Wilkinson a580e3a370 Merge branch '2.2.x' into 2.3.x
Closes gh-22641
2020-07-29 14:10:25 +01:00
Andy Wilkinson 72551242fd Allow XADataSource auto-config with no spring.datasource properties
Fixes gh-20229
2020-07-29 13:57:50 +01:00
Brian Clozel 6f2098ad71 Upgrade to Spring Framework 5.3.0-SNAPSHOT
This commit also switches to RSocket SNAPSHOTs and updates the
repository configuration to rely on "libs-snapshot", since the RSocket
SNAPSHOTs are mirrored there.

See gh-22640
2020-07-29 14:41:17 +02:00
Stephane Nicoll 8c418adb9b Polish "Add auto-configuration for Neo4j driver"
See gh-22301
2020-07-27 16:26:32 +02:00
Gerrit Meier 6134ff19f9 Add auto-configuration for Neo4j driver
This commit adds the support for creating a managed instance of the
Neo4j Java driver. The low-level support for Neo4j is helpful in
situations where the high-level abstraction of Spring Data Neo4j is not
needed.

See gh-22301
2020-07-27 16:26:32 +02:00
Andy Wilkinson 4827e84a12 Merge branch '2.3.x'
Closes gh-22581
2020-07-27 11:30:34 +01:00
Andy Wilkinson d0c75aef19 Merge branch '2.2.x' into 2.3.x
Closes gh-22580
2020-07-27 11:29:14 +01:00
Andy Wilkinson 16eaae0b2f Defer background pre-init till the environment is prepared
Previously, background pre-init was started in response to the
application starting event. This meant that it would be running while
the logging turbo filter was in place and was rejecting all logging.
As a result, any logging performed during pre-init would be lost.

This commit changes background pre-init so that it is now started
in response to the application environment prepared event. By this
point, the logging turbo filter has been removed as the logging levels
have been configured from the environment.

Closes gh-21897
2020-07-27 11:24:36 +01:00
Andy Wilkinson 3444a23765 Merge branch '2.3.x'
Closes gh-22579
2020-07-27 10:58:15 +01:00
Andy Wilkinson f0d90020e5 Merge branch '2.2.x' into 2.3.x
Closes gh-22578
2020-07-27 10:57:58 +01:00
Andy Wilkinson b98c3dccfd Fix property-based configuration of Undertow socket options
Previously, only UndertowOptions was used as the source of options for
both server and socket options, but it only contains server options.
As a result, attempting to configure any socket options defined by
XNIO's Options class would fail.

This commit updates the property-based configuration of options to use
UndertowOptions as the source for server options and XNIO's Options as
the source for socket options.

Fixes gh-22502
2020-07-27 10:47:14 +01:00
Stephane Nicoll 85ed16de13 Merge branch '2.3.x'
Closes gh-22568
2020-07-26 17:26:30 +02:00
Stephane Nicoll 6b32e62142 Fix CacheAutoConfiguration relative order for Couchbase
This commit fixes the auto-configuration of the Couchbase caching
support by configuring the cache once Spring Data Couchbase has gotten
a chance to be processed.

Closes gh-22542
2020-07-26 17:24:24 +02:00
izeye 6eba7c5f10 Polish
See gh-22549
2020-07-25 07:26:49 +02:00
Andy Wilkinson 793d266b7e Merge branch '2.3.x'
Closes gh-22546
2020-07-24 10:41:40 +01:00
Andy Wilkinson c605a6e34b Override other variant of registerBeanDefintions
Fixes gh-22480
2020-07-24 10:33:16 +01:00
Phillip Webb 14c1b0938a Polish 2020-07-22 18:25:27 -07:00
Phillip Webb da69286838 Merge branch '2.3.x' 2020-07-22 17:39:27 -07:00
Phillip Webb 187d3af7fc Update copyright year of changed files 2020-07-22 17:25:17 -07:00
Phillip Webb 217b2eff89 Merge branch '2.2.x' into 2.3.x 2020-07-22 17:03:23 -07:00
Phillip Webb b5e70157dc Update copyright year of changed files 2020-07-22 17:01:36 -07:00
Andy Wilkinson f88038f00d Upgrade to Couchbase Client 3.0.6
Closes gh-22456
2020-07-21 13:37:19 +01:00
Sébastien Deleuze 66bf684eb6 Ignore BackgroundPreinitializer in native images
BackgroundPreinitializer is not relevant in native images so it is
better to ignore it automatically in order to reduce the footprint
in such environment.

See gh-22392
2020-07-20 12:16:22 +01:00
Andy Wilkinson 85828953bd Perform enablement checks once in BackgroundPreinitializer
Closes gh-22406
2020-07-20 12:13:23 +01:00
Andy Wilkinson 0e8bf94289 Polish "Add properties for Netty HttpDecoderSpec"
See gh-22367
2020-07-17 20:19:31 +01:00
Julien Eyraud f068f9fc52 Add properties for Netty HttpDecoderSpec
See gh-22367
2020-07-17 20:19:31 +01:00
Stephane Nicoll 0cd83007e9 Merge branch '2.3.x'
Closes gh-22357
2020-07-16 14:24:20 +02:00
dreis2211 267283e3cd Handle null items as advertized in the Javadoc
See gh-22344
2020-07-16 14:17:53 +02:00
Andy Wilkinson 18a3459dc3 Polish "Avoid using reflection when configuring Tomcat listener"
See gh-22329
2020-07-15 11:19:52 +01:00
Filip Hanik be7048b58f Avoid using reflection when configuring Tomcat listener
This benefits native image building and AOT compilation,
as reflection requires manual configuration.

See gh-22329
2020-07-15 11:19:27 +01:00
Andy Wilkinson 177b3918ee Merge branch '2.3.x'
Closes gh-22340
2020-07-15 10:49:27 +01:00
Andy Wilkinson 259ea65388 Merge branch '2.2.x' into 2.3.x
Closes gh-22339
2020-07-15 10:49:01 +01:00
Andy Wilkinson d9882f2c88 Clarify the effects of ordering auto-configuration classes
Closes gh-22337
2020-07-15 10:48:01 +01:00
Andy Wilkinson 8abcb1b125 Polish 2020-07-14 17:22:31 +01:00
Andy Wilkinson c9eead31d1 Avoid reflection when creating manual RootBeanDefinitions
Closes gh-22318
2020-07-14 17:21:44 +01:00
Stephane Nicoll fe39a91290 Merge branch '2.3.x'
Closes gh-22331
2020-07-14 18:15:02 +02:00
dreis2211 de30e5c6ac Avoid unnecessary allocations in ConditionMessage for NORMAL style
See gh-22330
2020-07-14 18:12:17 +02:00
Stephane Nicoll 3ceae84176 Merge branch '2.3.x' 2020-07-14 16:58:02 +02:00
Stephane Nicoll 603e65a629 Polish 2020-07-14 16:57:42 +02:00
Stephane Nicoll c8b67becce Polish "Add additional properties to configure R2DBC pool"
See gh-21219
2020-07-14 16:52:07 +02:00
Rodolpho Couto 0d41596a42 Add additional properties to configure R2DBC pool
See gh-21219
2020-07-14 16:52:07 +02:00
Andy Wilkinson 2642b04073 Merge branch '2.3.x'
Closes gh-22327
2020-07-14 15:00:51 +01:00
dreis2211 60e7146326 Reduce started threads in OnClassCondition
Prior to this commit, OnClassCondition started a thread even if the number of
passed autoconfiguration class candidates never exceeded 1. This commit only
starts a thread if there is actually work to split in half.

See gh-22294
2020-07-14 14:59:53 +01:00
Andy Wilkinson 2af550ef73 Avoid using reflection with manual bean definitions
Closes gh-22318
2020-07-14 14:11:51 +01:00
Brian Clozel 0f264b68e8 Add option to configure PathPatternParser
As of Spring Framework 5.3, it is now possible to use `PathPatternParser`
to parse and match request mapping path patterns, as an alternative to
the current default `AntPathMatcher`.

This new implementation has been used for a while in Spring WebFlux and
it’s been designed for consistency and performance.

This commit introduces a new configuration property for opting-in this
new variant:

`spring.mvc.pathmatch.matching-strategy=path_pattern_parser`

The default option is still `ant_path_matcher` for now, but we might
change the default in future versions since Spring Framework considers
it the best choice for modern applications.

There are several behavior differences with this new variant:

* double wildcards `"**"` are rejected when used in the middle patterns,
this is only allowed as the last matching segment in a pattern.

* it is incompatible with some path matching options, like
suffix-pattern, registered-suffix-pattern or configuring a Servlet
prefix on the `DispatcherServlet` (`spring.mvc.servlet.path=/test`)

This commit introduces two `FailureAnalyzer` implementations to guide
developers when facing those issues.

Closes gh-21694
2020-07-09 21:34:00 +02:00
Andy Wilkinson 553d58a234 Merge branch '2.3.x'
Closes gh-22283
2020-07-09 10:37:18 +01:00
Andy Wilkinson c765df6e5d Merge branch '2.2.x' into 2.3.x
Closes gh-22282
2020-07-09 10:37:01 +01:00
Andy Wilkinson afa5b12bdb Make reactive Jetty auto-config back off without jetty-servlet
Fixes gh-22275
2020-07-09 10:36:32 +01:00
Scott Frederick 6b7640ba2e Merge branch '2.3.x'
Closes gh-22272
2020-07-08 15:10:42 -05:00
Scott Frederick 1e2176b6c9 Improve Redis URL validation
This commit improves the validation of URLs provided in the property
'spring.redis.url' used to auto-configure a Spring Data Redis
connection. In particular, only the URL schemes 'redis://' and
'rediss://' are allowed, and any other scheme will result in a
configuration error. A failure analyzer is also provided to improve
diagnostics for common mis-configurations detected by this validation.

Fixes gh-21999
2020-07-08 14:50:26 -05:00
Andy Wilkinson 3e33b6c854 Merge branch '2.3.x'
Closes gh-22263
2020-07-08 17:23:13 +01:00
Andy Wilkinson 502ccb6586 Honor spring.autoconfigure.exclude in test slices
Previously, the import selector for `@ImportAutoConfiguration` did not
consider the spring.autoconfigure.exclude property when determining
which auto-configurations to exclude. This meant that tests using a
slice that included a particular auto-configuration would include it
even if the application's configuration excluded it via
spring.autoconfigure.exclude. Confusingly, this could result in a
sliced test using an auto-configuration that would be excluded in a
broader `@SpringBootTest`.

This commit updates the ImportAutoConfigurationImportSelector to
consider the spring.autoconfigure.exclude property so that sliced tests
will use a subset of the auto-configurations that a `@SpringBootTest`
would use.

Fixes gh-21736
2020-07-08 17:22:32 +01:00
Johnny Lim df34d26f4f Replace ReflectionUtils with AssertJ's extracting()
See gh-22261
2020-07-08 13:57:59 +02:00
Andy Wilkinson 9894be8f1e Merge branch '2.3.x'
Closes gh-22255
2020-07-07 17:29:20 +01:00
Andy Wilkinson 0af8c35428 Auto-configure Rabbit CF with credentials provider and refresh service
Closes gh-22016
2020-07-07 13:07:40 +01:00
Andy Wilkinson 1b85ce0769 Streamline OAuth2 resource server auto-config class conditions
Fixes gh-22233
2020-07-07 12:22:27 +01:00
Andy Wilkinson 247fd59422 Merge branch '2.3.x'
Closes gh-22252
2020-07-07 11:52:50 +01:00
Andy Wilkinson b8bc219b25 Merge branch '2.2.x' into 2.3.x
Closes gh-22251
2020-07-07 11:52:34 +01:00