This commit also refactors OAuth2 client properties. With
the added support for authorization_code clients, client
registrations are now divided into `login` and `authorization_code`.
An environment post processor is used for backward compatibility with
old Open ID Connect login clients.
Closes gh-13812
Next to com.mongodb.MongoClient the MongoDB Java driver offers the
com.mongodb.client.MongoClient as entry point for database and
collection operations. Spring Data MongoDB supports
c.m.client.MongoClient via its MongoDbFactory using
SimpleMongoClientDbFactory.
The MongoAutoConfiguration now backs off if any of those two clients is
already defined in the Application context allowing
MongoDataAutoConfiguration to pick up the users driver implementation of
choice.
See gh-14176
This commit fixes the ordering between `CacheAutoConfiguration` and
`HibernateJpaAutoConfiguration` so that the auto-configured
`CacheManager` is configured before Hibernate starts.
Closes gh-14181
This commit introduces a subclass of `DispatcherHandler` that only
considers the current context when looking for WebFlux infrastructure
beans.
This avoids issues where a child context (e.g. with Actuator) picks up
infrastructure beans from the parent context and exposes all endpoints
instead of getting only the ones from the current context.
Closes gh-14012
This commits restores the behaviour of Spring Boot 1.x with regards to
the "trace" request param used to add the stacktrace to the model.
This was inadvertently changed so that the stacktrace would be added
if the parameter wasn't set.
Closes gh-14171
This commit adds a new auto-configuration choice for
`ClientHttpConnector`, this time using the Jetty RS HTTP client library
if available.
This is the best choice in case the application runs on a Jetty reactive
server, as both client and server will share resources.
Closes gh-14005
This commit makes sure that the auto-configuration for Spring
Integration runs after the datasource has been auto-configured if
necessary as there is an optional part that can initialize the jdbc
schema.
Closes gh-14175
This commit adds support for the new `ReactorResourceFactory` and
ensures that such a bean is created and destroyed with the application
context. This will create a `ClientHttpConnector` bean, to be configured
on the `WebClient.Builder` instance - or let developers create their own
`ClientHttpConnector` bean to override that opinion.
By default, the `ReactorResourceFactory` is configured to participate
with the global resources, for better efficiency.
Closes gh-14058
This commit adds a new `WebFluxRegistrations` interface that
allows developers to register custom instances of key WebFlux
infrastructure components, such as `RequestMappingHandlerMapping`
and `RequestMappingHandlerAdapter`.
Closes gh-13997
Because `HttpPutFormContentFilter` has been deprecated in Spring
Framework 5.1, this commit updates the auto-configuration to replace it
with the new `FormContentFilter`. This new filter is building on the
previous one and supports HTTP DELETE requests as well.
Both filters should not be used in addition, so the former
configuration has been removed. This commit also adds configuration
metadata to let developers know about the configuration key change.
Closes: gh-13363
This commit changes AbstractWebMvcEndpointHandlerMapping to
be a MatchableHandlerMapping. Additionally, EndpointRequest,
now delegates to MvcRequestMatcher for Spring MVC applications.
For all other applications, AntPathRequestMatcher is used as
a delegate.
Closes gh-13962
Previously, we would retrieve the EntityManagerFactory’s DataSource as
soon as it was being post-processed. When the native
EntityManagerFactory is being bootstrapped asynchronously, this
retrieval would block until bootstrapping had completed. This negated
some of the benefits of asynchronous bootstrapping.
This commit updates DataSourceInitializedPublisher so that it only
accesses the EntityManagerFactory’s DataSource once its bootstrapping
has completed. This is achieved using a decorated JpaVendorAdapter
that is called one the boostrapping has completed.
Closes gh-14061
In Spring Data Lovelace, repositories' bootstrap mode can be
configured via @EnableJpaRepositories. This commit adds support for
configuring the mode via the environment rather than having to use
the annotation. Additionally, when deferred or lazy bootstrapping is
being used, the LocalContainerEntityManagerFactoryBean is configured
to use a bootstrap executor. This allows JPA's initialization to be
performed on a separate thread, allowing the rest of application
context initialization to proceed in parallel.
Closes gh-13833
Since SPR-16946, Spring Framework revisited the DEBUG logging output
developers get while working on Spring MVC and Spring WebFlux
applications.
This commit aligns to those changes where DEBUG output was produced
in Spring Boot (especially in `DefaultErrorWebExceptionHandler`).
This also enables DEBUG logging on the related packages when running an
application with Spring Boot Developer Tools, providing a better
development experience.
This is also adding the new `spring.insights.web.log-request-details`
configuration property, which logs additional information about the
incoming requests at the DEBUG and TRACE levels. Since that information
can be sensitive (e.g. credentials, tokens, etc.), this property is not
enabled by default nor activated by the Developer Tools.
Closes: gh-13511
This commit adds support for providing a default ThreadPoolTaskScheduler
with sensible defaults. A new TaskSchedulerBuilder is provided with
defaults from the `spring.task.scheduler.*` namespace and can be used
to create custom instances.
If no custom `TaskScheduler` bean is present, `@EnableScheduling` now
uses the auto-configured task scheduler.
Closes gh-1397
This commit ensures that the new "spring.jmx.unique-names" property
deprecates the Endpoint's specific property as they share the same goal.
If both are set with an incompatible value, an exception is thrown
inviting the user to update their configuration.
Closes gh-13990
This commit adds support for providing a default ThreadPoolTaskExecutor
with sensible defaults. A new TaskExecutorBuilder is provided with
defaults from the `spring.task.*` namespace and can be used to create
custom instances.
If no custom `Executor` bean is present, `@EnableAsync` now uses the
auto-configure application task executor. Same goes for the async support
in Spring MVC.
Closes gh-1563
This commit removes support for `activemq-pool` in benefit of
`pooled-jms`. While the former is not JMS 2 compliant, the latter is and
is independent of the ActiveMQ codebase (so potentially reusable in
custom code).
Closes gh-13927
This commit deprecated the properties of `PooledConnectionFactory` that
are no longer supported by an alternative that is a JMS 2 compliant.
This commit also adds a note to warn users that this pool implementation
is not JMS 2 compliant.
Closes gh-13956
Add an `DispatcherServletPath` interface which provides a much more
consistent way to discover the path of the main dispatcher servet.
Prior to this commit, auto-configurations would often make use of the
`ServerProperties` class to discover the dispatcher servlet path. This
mechanism isn't very explicit and also makes it hard for us to relocate
that property in Spring Boot 2.1.
This commit also reverts most of fddc9e9c7e since it is now clear that
the supporting multiple dispatcher servlet paths will be much more
involved that we originally anticipated.
Closes gh-13834
This commit adapts to a Spring Framework change based on SPR-11419 and
SPR-15338. Rather than throwing an exception when injecting a List or
Map of a candidate bean that is not present, an empty collection/map is
injected.
Previously, exclude of an import selector was applied only locally. In
other words, if one import selector imports `AcmeAutoConfiguration` and
another one exclude it, it would still be imported because exclude were
applied separately
This commit collects the outcome of all auto-configuration import
selectors and then apply exclusions in a single pass.
Closes gh-12586