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
Previously, if a user defines a `@Bean` with a method that returns
`null`, injection by type will ignore that definition but the report
doesn't mention that candidate.
This commit improves the failure analyzer to look for user-defined beans
as well, detecting beans that are `null` matching the requested type
and including them in the report.
Closes gh-13531
This commit adds the ability to customize the RetryTemplate used in the
RabbitMQ infrastructure. The customizer is slightly unusual and offer
a `Target` enum that define the component that will use the retry
template: `SENDER` for the auto-configured `RabbitTemplate` and
`LISTENER` for a listener container created by a
`RabbitListenerContainerFactoryConfigurer`.
Closes gh-13793
This commit turns a lazy injection point for `HttpMessageConverters`
into an `ObjectProvider`-backed injection.
This allows to lazily rely on that bean without creating for it; in some
environments, such proxy creation can lead to issues like SPR-16990.
See gh-13785
Since SPR-17034, the core container now behaves a bit differently when
dealing with `null` beans.
Given a `null` `HandlerMapping` bean named "resourceHandlerMapping":
* `context.getBean("resourceHandlerMapping", HandlerMapping.class)`
still returns a `NullBean`
* `ListableBeanFactory.getBeansOfType` will return a Map of all existing
beans, not including the `null` ones as values of the map.
Closes gh-13760
This commit adapts to a recent Spring Framework change (a40d25a) that
turns no-op Spring MVC beans (infrastructure components that, given
their configuration, won't contribute anything to the application) into
`NullBean` instances.
Provides a way to easily exclude `MongoAutoConfiguration` or
`MongoReactiveAutoConfiguration` so that multiple mongo clients
are not present.
Fixes gh-12407
This commit makes sure that Flyway/Liquibase migrates the schema if
necessary before a `JdbcTemplate` is made available as an injection
point.
This commit also adds a test that validates simple datasource
initialization (spring.datasource.*) happens before a `JdbcTemplate`
bean can be used.
Closes gh-13155
This commit makes sure that JMS and Mail JNDI lookups behave the same
way as DataSource JNDI lookups by enabling the "resourceRef" flag.
This will make sure to add "java:comp/env" to the lookup if the JNDI
name doesn't already contain it. If that name does not exist, a second
attempt to the original name will be issued automatically.
Closes gh-12803
This commit adds support for CachingConnectionFactory for both Artemis
and ActiveMQ. If connection pooling is not enabled explicitly, sessions,
producers and consumers are cached. The factory can be further
customized, including reverting to the raw ConnectionFactory, using the
`spring.jms.*` namespace.
Closes gh-12161
This commit expands ActiveMQ's connection pooling to artemis. The same
pooling features are now shared by the two brokers and a
PooledConnectionFactory can be auto-configured when the necessary jar is
present.
Closes gh-13523
Prior to this commit, the `DefaultErrorWebExceptionHandler` would parse
the HTTP "Accept" headers when routing the request to the error handler;
if an error occured during parsing, an `InvalidMediaTypeException` would
be thrown and break the error handling for this request.
This commit ignores those exceptions and makes sure that the error
handling function does not override the response status or the error
itself with those exceptions.
Closes: gh-13372
As of https://jira.spring.io/browse/SPR-16381, Spring Framework now
supports both gzip and Brotli as compression formats for static
resources resolved by the resource chain.
The `GzipResourceResolver` has been deprecated and replaced by the
`EncodedResourceResolver`. This commit uses this new resolver and adapts
the configuration key to reflect those changes.
Note that this resolver is now configured ahead of the
`VersionResourceResolver`.
Closes gh-13242
As of Spring Framework 5.1, we're depending on the Reactor Californium
release train.
Reactor Netty is now at version 0.8 and changed its artifact
coordinates, package names and broke several APIs. Spring Framework is
now up-to-date with those changes and this commit does the same for
Spring Boot.
Note that in that process, the `NettyServerCustomizer` has been changed
since the former `HttpServerOptions.Builder` API is now gone from
Reactor Netty, and we're now relying on immutable server instances
instead of a stateful builder pattern.
See gh-13321
Some Quartz initialization scripts have comments in a different format.
This commit introduces a `comment-prefix` property that should be set by
the user if their target database has a script that contains those
unusual comments.
Closes gh-13041
At present, auto-configuration of `LdapContextSource` is conditional on
presence of a `ContextSource` bean. However, there are valid use cases
which require multiple `ContextSource` bean, for instance
`PooledContextSource`. With the current arrangement, the
auto-configuration of `LdapContextSource` will back off if user provides
a `PooledContextSource` bean, while it would still be reasonable to
reuse the auto-configured `LdapContextSource`.
This commit improves `LdapContextSource` factory method return value and
condition to back off only if users actually provide a
`LdapContextSource` bean themselves.
See gh-13143
Auto-configuration of LDAP's `LdapTemplate` is currently a part of
`LdapDataAutoConfiguration` which is conditional of presence of
`LdapRepository` (i.e. Spring Data LDAP). This arrangement isn't ideal
since the `LdapTemplate` is a part of Spring LDAP project, and therefore
should not be tied to Spring Data LDAP.
This commit improves and simplifies LDAP auto-configuration by moving
`LdapTemplate` configuration to `LdapAutoConfiguration`. Consequently,
`LdapDataAutoConfiguration` is not needed anymore and is removed.
See gh-13136
This commit adds auto-configuration support for both `RestClient` and
`RestHighLevelClient` which are provided by `elasticsearch-rest-client`
and `elasticsearch-rest-high-level-client` dependencies respectively.
`RestClient` is associated with configuration properties in the
`spring.elasticsearch.rest.*` namespace, since this is the component
taking care of HTTP communication with the actual Elasticsearch node.
`RestHighLevelClient` wraps the first one and naturally inherits that
configuration.
Closes gh-12600
This commit removes Hibernate imports from JpaProperties so that it can
be used with another JPA provider.
This commit is a breaking change for an internal, yet public class used
to transmit customizations provided by the user. It does not change the
external functionality though: naming strategies defined as bean are
still taken into account and a customizer has a chance to override it
regardless.
Closes gh-13043