Rather than checking if Jedis is on the classpath, this commit changes
the conditions of `RedisRepositoriesAutoConfiguration` to check for the
presence of a `RedisConnectionFactory` bean that is going to be
necessary to create the Redis repositories anyway.
Checking for Jedis is no longer correct since we now support Lettuce as
well.
Closes gh-9523
We now use LettuceClientConfiguration and JedisClientConfiguration to
configure connection factories. Client-specific configuration can be
customized by providing LettuceClientConfigurationBuilderCustomizer and
JedisClientConfigurationBuilderCustomizer beans.
See gh-9510, gh-8894, gh-9490
This commit reworks the property to be an enum with the list of
supported listener types rather than a boolean that flip to a
batch listener.
Closes gh-9448
Force the use of the http Neo4j driver as the bolt one attempts to
connect to the server on startup by default (and there is no way to
disable that behaviour).
See https://github.com/neo4j/neo4j-java-driver/issues/380
Closes gh-9499
Remove test-jar artifacts from Maven projects and relocate classes. The
majority of utilities now live in the `spring-boot-testsupport` module.
This update will help us to deploy artifacts using the standard Maven
deploy plugin in the future (which doesn't support the filtering of
individual artifacts).
Fixes gh-9493
CompositeContentTypeResolver was recently removed [1] and
WebFluxConfigurationSupport now creates a RequestedContentTypeResolver
bean instead. This commit updates WebFluxAutoConfigurationTests
accordingly.
[1] 01a92517bd
`QuartzAutoConfigurtion` currently blows up if there are multiple
`Executor` beans in the context.
This commit changes the configuration to retrieve `Executor` bean using
`ObjectProvider#getIfUnique` which won't fail in scenarios where there
are multiple `Executor` beans with none marked as `@Primary`.
Closes gh-9434
In an MVC web application, DelegatingWebMvcConfiguration provides the
ConversionService while also consuming WebMvcConfigurerAdapters that,
among other things, can configure HTTP message converters. Boot's
WebMvcConfigurerAdapter, WebMvcAutoConfigurationAdapter, consumes
the HttpMessageConverters bean and uses it to configure Spring MVC's
HTTP message converters. This can create a bean dependency cycle if
an HTTP message converter bean depends, directly or indirectly on
the ConversionService. An example of the cycle is:
┌─────┐
| jsonComponentConversionServiceCycle.ThingDeserializer defined in …
↑ ↓
| org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$EnableWebMvcConfiguration
↑ ↓
| org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter
↑ ↓
| org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration
↑ ↓
| mappingJackson2HttpMessageConverter defined in class path resource [org/springframework/boot/autoconfigure/web/JacksonHttpMessageConvertersConfiguration$MappingJackson2HttpMessageConverterConfiguration.class]
↑ ↓
| jacksonObjectMapper defined in class path resource [org/springframework/boot/autoconfigure/jackson/JacksonAutoConfiguration$JacksonObjectMapperConfiguration.class]
└─────┘
This commit breaks the cycle by making WebMvcAutoConfigurationAdapter
consume HttpMessageConverters lazily. This allows the adapter to be
created without triggered instantiation of every HTTP message
converter bean and all their dependencies. This allows it to be
injected into DelegatingWebMvcConfiguration without triggering an
attempt to retrieve the ConversionService.
Closes gh-9409
If the auto-configured `Scheduler` instance backed by JDBC job store is
used as a dependency in an application component, the initialization of
`Scheduler` will be triggered before `QuartzDatabaseInitializer`. This
will result in failure due to schema not being prepared in time for
`Scheduler` to populate job details.
This commit ensures `QuartzDatabaseInitializer` is initialized before the
auto-configured `Scheduler` by introducing a dependency between the two.
See gh-9411
This commit removes the `client` namespace for InfluxDB as the
component that is created is `InfluxDB`, not `InfluxDBClient` or
something.
This aligns with all the other url/user/password properties Spring
Boot provides already
See gh-9066
This commit makes sure to reuse an existing or auto-configured
`JdbcTemplate` when auto-configuring a `NamedParameterJdbcTemplate`.
This ensures that whatever customizations have been applied on the
`JdbcTemplate` are properly shared.
Closes gh-4945
This commit adds support for configuring Spring Data Web
`PageableHandlerMethodArgumentResolver` and
`SortHandlerMethodArgumentResolver` using configuration properties.
See gh-9339
Since SPR-15536, WebFlux.fn is now configured with `@EnableWebFlux`,
along the annotated controllers. Both `RouterFunction` and Controller
instances can now live within the same application and they share
the same web infrastructure.
This commit removes the custom auto-configuration for `RouterFunction`
and relies on `@EnableWebFlux` for that.
Closes gh-9165
This change aligns ErrorAttributes with ResponseEntityExceptionHandler
which takes a WebRequest as a parameter of its handleException method.
WebRequest extends RequestAttributes and provides access to much more
than just the request's attributes. For example request headers and
parameters are available from WebRequest.
Closes gh-7952
Closes gh-6555
Previously, when the liquibase.url, .username, and .password
properties were used to configure a DataSource specifically for
Liquibase that DataSource would never be explicitly closed. As it is
created by DataSourceBuilder with no explicitly configured type it
will use whichever connection pool is available and, therefore, will
create and keep open the pool's minimum number of connections. This
is an unnecessary use of resources both in the application and in the
database.
This commit updates LiquibaseAutoConfiguration so that if it uses
DataSourceBuilder to create a DataSource then it will also close that
DataSource once the database has been migrated.
Closes gh-9218
This commit allows *any* type of `RouterFunction` to be injected in the
WebFlux.fn auto-configuration; previously the `RouterFunction<T>` would
restrict injected beans to a single parameterized type.
Doing requires using the `RouterFunction.andOther` method to collect
them.
Fixes gh-9181
This commit removes the default configuration value previously set
for `spring.thymeleaf.reactive.media-types` since this value overrides
the defaults provided by Thymeleaf.
This value does not drive the default media type used by views, but
rather all media types that the templating engine should support.
Fixes gh-9134
This commit adds a `TomcatWebSocketReactiveWebServerCustomizer`
that customizes the Tomcat context to accept WebSockets connections.
Since reactive servers don't use the JSR 356 for that support,
only Tomcat customization is required for now.
This commit also reorders the server auto-configuration
so that undertow has a chance to be auto-configured before
reactor-netty, which should be a popular dependency thanks to
its HTTP client library.
The existing WebSocket infrastructure for Serlvet based containers
has been moved to a dedicated package and renamed accordingly.
Fixes gh-9113