Commit Graph

2430 Commits (062bd90d878f6d648405679b942bd513608aae28)

Author SHA1 Message Date
Stephane Nicoll 6254ad634e Merge branch '2.3.x'
Closes gh-23535
4 years ago
Stephane Nicoll cd15cbdc79 Do not execute datasource initialization in a separate thread
This commit makes sure that `data.sql` is performed in the same thread
as the one initializing the JPA container.

Closes gh-22852
4 years ago
Stephane Nicoll 75554ce236 Polish "Add support for Oracle UCP"
See gh-23403
4 years ago
Fabio Grassi a21ab392b6 Add support for Oracle UCP
See gh-23403
4 years ago
Andy Wilkinson a19a565410 Stop registering the default servlet by default
Previously, the default servlet was registered automatically when using
embedded Jetty, Tomcat, or Undertow. However, it is not used by the
majority of applications where Spring MVC's DispatcherServlet will be
the only servlet that's needed. As such configuring the default servlet
was wasting CPU and memory.

This commit changes the default for registering the default servlet to
false. It can be re-enabled by setting
server.servlet.register-default-servlet=true.

Closes gh-22915
4 years ago
Stephane Nicoll 137f4ec980 Merge branch '2.3.x'
Closes gh-23522
4 years ago
Stephane Nicoll 466c1012d6 Merge branch '2.2.x' into 2.3.x
Closes gh-23521
4 years ago
Stephane Nicoll fd3683646a Migrate SessionAutoConfigurationMongoTests to Testcontainers
Closes gh-23512
4 years ago
Stephane Nicoll cc1f7402a7 Associate ResourceLoader with RabbitConnectionFactoryBean
Closes gh-22332
4 years ago
Stephane Nicoll 36382e599c Add support for Redis 6 authentication with username
Closes gh-22702
4 years ago
Stephane Nicoll a5c20a5132 Polish 4 years ago
Stephane Nicoll 4009acf025 Add support for Hazelcast
This commit upgrades to Hazelcast 4.0.3, yet keeping compatibility with
Hazelcast 3.x.

Closes gh-20856
Closes gh-23475
4 years ago
Stephane Nicoll 4d10fbfd52 Rewrite JobLauncherApplicationRunnerTests
This commit rewrites the test to use an in-memory database rather than
the deprecated Map-based arrangement.

Closes gh-23369
4 years ago
Andy Wilkinson 659b459fab Make the auto-configured LocaleContextResolver conditional on missing bean
Closes gh-23419
4 years ago
Stephane Nicoll 1631ae23f5 Allow RestTemplateBuilder to be further customized
Closes gh-23389
4 years ago
Andy Wilkinson 1c6e37b2ac Merge branch '2.3.x'
Closes gh-23409
4 years ago
Andy Wilkinson 55bfef9901 Merge branch '2.2.x' into 2.3.x
Closes gh-23408
4 years ago
Andy Wilkinson 95f26c6358 Configure Flyway with initSqls for any DataSource configuration
Previously, spring.flyway.init-sqls was only applied to Flyway's
configuration if Flyway was being configured to create the DataSource.
If Flyway was being configured to use an existing DataSource, init-sqls
was not applied. This is a hangover from when the init SQLs support was
introduced. At that time, Flyway only supported SQL to initialize the
connection when it was creating the DataSource. Flyway 5.2 added init
SQL support no matter how Flyway's DataSource was configured.

This commit updates FlywayAutoConfiguration to always apply the
init-sqls property to Flyway's configuration. The property's
documentation does not describe the current limitation so this change
should align the behaviour with what the documentation leads people to
expect.

Fixes gh-23392
4 years ago
Phillip Webb 1ae1436211 Refactor BootstrapRegistry support
Refactor `BootstrapRegistry` support following initial prototype work
with the Spring Cloud team.

This update splits the `BootstrapRegistry` API into `BootstrapRegistry`,
`BootstrapContext` and  `ConfigurableBootstrapContext` interfaces and
moves it to the same package as `SpringApplication`.

A new `Bootstrapper` interface has been introduced that can be added
to the `SpringApplication` to customize the `BootstrapRegistry` before
it's used.

Closes gh-23326
4 years ago
Stephane Nicoll 474ab7f69c Adapt tests to deprecations in Spring Batch 4 years ago
Andy Wilkinson 55f939e93b Merge branch '2.3.x'
Closes gh-23321
4 years ago
Andy Wilkinson 409743eddb Merge branch '2.2.x' into 2.3.x
Closes gh-23320
4 years ago
Andy Wilkinson 5a266155b0 Disable proxyBeanMethods on Spring Session config sub-classes
Closes gh-23280
4 years ago
Andy Wilkinson 7562c4eb6f Adapt to WebClient's new exception wrapping
See spring-projects/spring-framework#23842
See gh-23170
4 years ago
Phillip Webb 922b4c04bf Merge branch '2.3.x' 4 years ago
Phillip Webb f5ae58e8e5 Fix deprecation warning
See gh-23256
4 years ago
Phillip Webb f1d9832282 Merge branch '2.3.x'
Closes gh-23259
4 years ago
Phillip Webb 507fae5141 Merge branch '2.2.x' into 2.3.x
Closes gh-23258
4 years ago
Phillip Webb d8232b3c21 Polish 'Allow other "timestamp" types in MVC error model'
See gh-23256
4 years ago
lock14 d1d953819a Allow other "timestamp" types in MVC error model
Remove casting "timestamp" to `java.util.Date` in
`ErrorMvcAutoConfiguration` as the cast is not necessary and it
prevents other types (e.g. `java.time`) from being used.

See gh-23256
4 years ago
Stephane Nicoll 7a8b7b9fa7 Polish "Add separate property for Redis read and connection timeout"
See gh-23137
4 years ago
anshlykov 2527fcac9c Add separate property for Redis read and connection timeout
See gh-23137
4 years ago
Stephane Nicoll 36d4e95254 Merge branch '2.3.x'
Closes gh-23251
4 years ago
Stephane Nicoll 7c13c01cb6 Fix mapping of Cassandra's idle-timeout and heartbeat-interval
Previous to this commit the connection idle timeout and heartbeat
interval were mapped to seconds whereas Cassandra expects ms for all
duration types.

This commit fixes the mapping and removes the default duration unit
since it should be considered ms like every other duration properties.

Closes gh-23249
4 years ago
Brian Clozel 0715750eb3 Polish "Add SSL support to RSocketServer"
See gh-19399
4 years ago
cbono b4810b8b91 Add SSL support to RSocketServer
See gh-19399
4 years ago
Andy Wilkinson 8daf57fdeb Upgrade to Spring Security 5.4.0
The commit also includes an upgrade to Nimbus JOSE JWT 9.0. Spring
Security requires 9.0 and it is not backwards compatible with 8.19.

Closes gh-23225
Closes gh-23242
4 years ago
dreis2211 79ec1401a5 Enable Spring Integration RSocket test again
See gh-23229
4 years ago
Brian Clozel 9e0fd01aae Deprecate resource "app-cache" configuration support
This commit deprecates the
`"spring.resources.chain.html-application-cache"` configuration property
and its support, since the feature has been deprecated in Spring
Framework.

The app-cache manifest feature is being removed from browsers in favor
of web workers.

Closes gh-23228
4 years ago
Stephane Nicoll a73b7bb7dd Polish
This commit makes sure that no high-level client is auto-configured if
a low-level client is registered as a bean.

See gh-22358
4 years ago
Andy Wilkinson aa3c93078e Adapt to deprecation of ReactiveDataAccessStrategy
ReactiveDataAccessStrategy has been deprecated in Spring Data R2BC in
favor of R2dbcConverter (and StatementMapper and UpdateMapper). When
not using Boot, an R2dbcConverter bean is now defined by
AbstractR2dbcConfiguration. This commit updates
R2dbcDataAutoConfiguration to replace the definition of a
ReactiveDataAccessStrategy bean with the definition of an
R2dbcConverter bean.

See gh-23197
4 years ago
Brian Clozel 1d73d4eda7 Remove Elasticsearch RestClient auto-configuration
Prior to this commit, Spring Boot would auto-configure both
Elasticsearch variants: `RestClient` ("Low Level" client) and
`RestHighLevelClient` ("High Level" client).
Since one can be derived from the other, this would create complex and
unclear situations depending on what developers provided with their
configuration.

`RestHighLevelClient` is mostly for actual use of the Elasticsearch API,
with support for specific methods and (de)serialization. On the other
hand, `RestClient` is merely wrapping the Apache HTTP client for
load-balancing support and low level HTTP features.

This commit completely removes the support for `RestClient` in Spring
Boot and now requires the presence of the
`org.elasticsearch.client:elasticsearch-rest-high-level-client`
dependency for REST client support with Elasticsearch.

Closes gh-22358
4 years ago
Andy Wilkinson 016c46c6b3 Temporarily disable Spring Integration RSocket test
See gh-23214
See gh-23010
4 years ago
Stephane Nicoll 73c039e4b8 Fix use of deprecated methods 4 years ago
Stephane Nicoll d2eeb9524f Merge branch '2.2.x' into 2.3.x
See gh-23183
4 years ago
Stephane Nicoll 4b5a3f4ff9 Start building against Spring Framework 5.2.9 snapshots
See gh-23182
4 years ago
Stephane Nicoll 681abcc185 Polish "Configure SAML 2.0 Service Provider via Metadata"
See gh-23045
4 years ago
Josh Cummings 5187c01e39 Configure SAML 2.0 Service Provider via Metadata
See gh-23045
4 years ago
Stephane Nicoll ce169c4d51 Allow to customize how EntityScanner scans entities
This commit adds a protected method that lets an override customize the
configuration of the ClassPathScanningCandidateComponentProvider used
to scan entities.

Closes gh-23154
4 years ago
Andy Wilkinson 84a12c8436 Upgrade to Testcontainers 1.14.3
Closes gh-23122
4 years ago
Stephane Nicoll 674ad85cdb Polish "Add support for RabbitMQ's addressShuffleMode property"
See gh-23091
4 years ago
Jonghan Kim 4b77e2e205 Add support for RabbitMQ's addressShuffleMode property
See gh-23091
4 years ago
Johnny Lim e48af31ced Polish
See gh-23081
4 years ago
Stephane Nicoll 28b938a229 Merge branch '2.3.x'
Closes gh-23088
4 years ago
dreis2211 d8ba7dd4d0 Remove unused methods
See gh-23086
4 years ago
Andy Wilkinson e9ab269b3b Polish "Add a configuration property for KLC's idleBetweenPolls"
See gh-23048
4 years ago
hoaphan 03a8937d5c Add a configuration property for KLC's idleBetweenPolls
See gh-23048
4 years ago
Stephane Nicoll 085091dbe3 Adapt auto-configurations to back-off in presence of TransactionManager
Previous to this commit, an auto-configuration would create a
PlatformTransactionManager if none is present and others conditions are
met. Spring Framework now has the notion of TransactionManager, a parent
interface that gathers both PlatformTransactionManager and
ReactiveTransactionManager.

Spring Boot should not be in a situation where both managers are defined
out-of-the-box. This commit makes sure to back-off if any
TransactionManager is available.

Closes gh-22851
4 years ago
Stephane Nicoll f191b7513d Polish 4 years ago
Andy Wilkinson 7a5392d6bd Polish 4 years ago
Stephane Nicoll 640000c0bb Disable file system preference for Freemarker templates
Previously to this commit, a project that has several classpath
locations matching the template path may lead to some of those
locations to be ignored if one of them is a directory. This can easily
happen if you run your tests in your IDE.

This commit changes the default of "preferFileSystemAccess" to
false so that the complete classpath is always considered.

Closes gh-23051
4 years ago
Stephane Nicoll deee3606c3 Merge branch '2.3.x'
Closes gh-23064
4 years ago
Stephane Nicoll 0374ed2a0c Merge branch '2.2.x' into 2.3.x
Closes gh-23063
4 years ago
Stephane Nicoll 5b0f22e8fe Fix unintended import on commons lang
Closes gh-23059
4 years ago
Stephane Nicoll aed49c0631 Add configuration option for GridFsTemplate's bucket
Closes gh-22854
4 years ago
Phillip Webb ea8762c484 Update copyright year of changed files 4 years ago
Phillip Webb 2fb08ca48f Merge branch '2.3.x' 4 years ago
Phillip Webb 15a0cbc96b Update copyright year of changed files 4 years ago
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
4 years ago
Stephane Nicoll 8c0318edc7 Polish "Consider RecordFilterStrategy in Kafka auto-configuration"
See gh-22973
4 years ago
anshlykov f68dfde35e Consider RecordFilterStrategy in Kafka auto-configuration
See gh-22973
4 years ago
Madhura Bhave bbbbe8e4d2 Make security auto-configs back off when SecurityFilterChain present
Closes gh-22739
4 years ago
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
4 years ago
Andy Wilkinson 4398c71d12 Merge branch '2.3.x'
Closes gh-22938
4 years ago
Andy Wilkinson 8c4e6f766c Revert "Merge pull request #21060 from dsyer"
This reverts commit 6547ea56f9, reversing
changes made to e9e4a34e62.

Fixes gh-22039
4 years ago
Stephane Nicoll 947e484001 Merge branch '2.3.x'
Closes gh-22928
4 years ago
Stephane Nicoll d0662e824a Fix default value of server.jetty.accesslog.format
Closes gh-22921
4 years ago
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
4 years ago
Phillip Webb 7838c7b072 Polish 'Support ConfigurationClassPostProcessor supplier'
See gh-22858
4 years ago
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
4 years ago
Andy Wilkinson abf6123bae Upgrade to Kafka 2.5.1
Closes gh-22868
4 years ago
Stephane Nicoll 5bd69fcd61 Merge branch '2.3.x'
Closes gh-22874
4 years ago
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
4 years ago
Andy Wilkinson ca93c8da94 Merge branch '2.3.x'
Closes gh-22856
4 years ago
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
4 years ago
Andy Wilkinson 969dd35e45 Upgrade to Mockito 3.4.6
Closes gh-22838
4 years ago
Andy Wilkinson 4933b2688f Align with changes in latest Integration snapshots
See gh-22729
4 years ago
Phillip Webb f7f4ff0ac9 Update copyright year of changed files 4 years ago
Stephane Nicoll dac63fc3e5 Polish 4 years ago
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
4 years ago
Madhura Bhave f0ef47dfad Fix additional deprecations 4 years ago
Madhura Bhave 0d79bd08a6 Fix deprecations 4 years ago
Stephane Nicoll 516582f6d3 Merge branch '2.3.x'
Closes gh-22744
4 years ago
Stephane Nicoll 621f026499 Polish "Support configuration of entityId for a SAML Relying Party"
See gh-22258
4 years ago
Danilo Piazzalunga 5352ec1cba Support configuration of entityId for a SAML Relying Party
See gh-22258
4 years ago
Stephane Nicoll 589669d0cc Polish "Add support for selecting the Redis client to use"
See gh-22569
4 years ago
bono007 ac651442fa Add support for selecting the Redis client to use
See gh-22569
4 years ago
Andy Wilkinson bc44cd6705 Polish 4 years ago
Andy Wilkinson 7f53aef568 Upgrade to Kafka 2.6.0
Closes gh-22731
4 years ago
Stephane Nicoll 903dc93887 Polish "Add option to disable Redis Cluster dynamic sources refresh"
See gh-22571
4 years ago