As discussed on issue #35628, at some point the host property accepted
multiple comma-separated hosts. However, this was not intended, and for
better clarification, it was decided to implement a clearer error
message for this situation.
See gh-35684
This commit restores the previous behavior of MongoDB auto-
configuration, where the value of the
`spring.data.mongodb.authentication-database` is set in the
credentials when provided.
Fixes gh-35567
This commit restores the previous behavior of MongoDB auto-
configuration, where the value of the `spring.data.mongodb.database`
property takes precedence over the database specified in a
`spring.data.mongodb.uri` property.
Fixes gh-35566
Add `WelcomePageNotAcceptableHandlerMapping` which will return
an HTTP 406 status if a suitable welcome page is found but
cannot be accepted for the request.
An additional mapper is used so that we don't need to change
the order of the `WelcomePageHandlerMapping`. It's possible
that users may have additional root handler mappings
registered to run after the `WelcomePageHandlerMapping`
and we still need to respect those.
Fixes gh-35552
This commit removes an unnecessary test that checks for the pagination
and Connection support in Spring for GraphQL. After a change in
spring-projects/spring-graphql#707, we no longer can test this in
isolation, nor does it make sense to test this integration that
deeply.
See gh-35449
Fixes an issue where auto-configuration for Spring Authorization Server
was overriding the default exception handling (AuthenticationEntryPoint)
resulting in anonymous requests to the token endpoint being redirected
to the Spring Security login page instead of returning 401 Unauthorized.
Auto-configuration now registers a defaultAuthenticationEntryPointFor
that is added to any other entry points already configured.
See gh-35368
Replace `SessionRepositoryFilterConfiguration` filter registration bean
with a `DelegatingFilterProxyRegistrationBean` so that
`SessionRepository` beans are not initialized early.
Fixes gh-35240
The properties `spring.couchbase.env.ssl.key-store`
and `spring.couchbase.env.ssl.key-store-password`
are deprecated in favor of configuring an SSL bundle with
`spring.couchbase.env.ssl.bundle`. The older properties
have somewhat confusing names, since they are used to
configure a trust store in Couchbase, and they don't
provide all the options that an SSL bundle provides.
Closes gh-35135
Introduce `WebClientSsl` interface and auto-configuration to allow a
WebClient builder to have custom SSL configuration applied.
The previous `ClientHttpConnectorConfiguration` has been been changed
to now create `ClientHttpConnectorFactory` instances which can be used
directly or by `AutoConfiguredWebClientSsl`.
Closes gh-18556
Update `SslOptions` so that `null` is used for default values rather
than empty sets. Most libraries use `null` to indicate defaults so
aligning our class makes things easier.
See gh-34814
Update Tomcat, Jetty, Undertow and Netty servers so that an SslBundle
is used to apply SSL configuration. Existing `Ssl` properties are
internally adapted to an `SslBundle` using the `WebServerSslBundle`
class. Additionally, if `Ssl.getBundle()` returns a non-null value the
the `SslBundles` bean will be used to find a registered bundle by name.
See gh-34814
Add auto-configuration for SSL bundles including new configuration
properties that can be used to define a bundle.
SSL bundle properties are provided under the `spring.ssl.bundle` key.
Currently `jks` and `pem` variants are support. Both are configured
as a `Map` where the bundle name is the key.
A typical example would be:
spring:
ssl:
bundle:
pem:
mybundle
key:
password: secret
keystore:
certificate: classpath:mycert.pem
private-key: classpath:mykey.pem
A `SslBundleRegistrar` interface is also provided to allow programmatic
contributions to the auto-configured `SslBundleRegistry`.
See gh-34814
Prior to this commit, a failure to load a ConnectionDetailsFactory
caused startup to fail. This causes problems when some of a
factory's required classes were not available, for examle when using
spring-boot-docker-compose without Actuator.
Fixes gh-35100
This commit deprecates OAuth2ClientPropertiesRegistrationAdapter as
it wasn't really an adapter because it provides a static utility
method rather than adapting one contract to another. A replacement,
OAuth2ClientPropertiesMapper, is introduced that maps the OAuth2
client properties to the required types.
Closes gh-34714
This commit adds the following properties under
spring.security.oauth2.authorizationserver.client.[registration-id]:
* endpoint.device-authorization-uri
* endpoint.device-verification-uri
* token.device-code-time-to-live
See gh-34957
Previously, FlywayProperties returned an empty string when its
password had not been set. This prevented the desired fallback to
JdbcConnectionDetails.
Fixes gh-35046
Update restcontainers service connections support so that
technology specific `@ServiceConnector` annotations are not longer
required.
A single `@ServiceConnector` annotation can now be used to create
all `ConnectionDetail` beans.
Closes gh-35017
Update the auto-configuration gradle plugin so that the
configuration-properties plugin is not longer automatically applied.
This allows us to have auto-configuration modules that don't ship
configuration properties.
Closes gh-35028
Update Redis auto-configuration so that `RedisConnectionDetails`
beans may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update Rabbit auto-configuration so that `RabbitConnectionDetails`
beans may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update Neo4J auto-configuration so that `Neo4jConnectionDetails`
beans may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update Mongo auto-configuration so that `MongoConnectionDetails`
beans may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update Kafka auto-configuration so that `KafkaConnectionDetails`
beans may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update Influx auto-configuration so that `InfluxDbConnectionDetails`
beans may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update Elasticsearch auto-configuration so that
`ElasticsearchConnectionDetails` beans may be optionally used to
provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update Couchbase auto-configuration so that
`CouchbaseConnectionDetails` beans may be optionally used to provide
connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update Cassandra auto-configuration so that `CassandraConnectionDetails`
beans may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update R2DBC auto-configuration so that `R2dbcConnectionDetails` beans
may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Update JDBC auto-configuration so that `JdbcConnectionDetails` beans
may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Add a `ConnectionDetails` tagging interface which will be used
to mark beans that are a source of configuration settings for
connection to a remove service. When such beans are available,
they will take precedence over any connection-related
configuration properties. Configuration properties that are not
related to the connection itself, such as properties that control
the size and behavior of a connection pool, will still used.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
This commit auto-configures the new pagination and sorting support for
Spring for GraphQL, if Spring Data is available.
The `GraphQlAutoConfiguration` now contributes a `CursorStrategy` bean
that is used to set up the pagination and sorting data fetching
infrastructure.
This commit also configures by default a
`ConnectionTypeDefinitionConfigurer` that automatically detects
`*Connection` types and contributes the relevant schema definitions
according to the Relay spec.
See gh-34677
To apply `@ControllerAdvice` exception handling to non-controller
DataFetcher implementations like QueryDslDataFetcher,
QueryByExampleDataFetcher, and others, this commit exposes the
DataFetcherExceptionResolver from AnnotatedControllerConfigurer as a
bean. The existing auto-configured for DataFetcherExceptionResolver
then picks this up and passes it into the builder used to create the
GraphQlSource.
Closes gh-34526
This commit adds a new configuration property,
`spring.reactor.context-propagation` that configures the context
propagation mode for Reactor operators. By default the value is set to
"AUTO" for reinstating automatically context values as ThreadLocals
within Reactor operators. The "LIMITED" mode restricts this feature ot
the "tap" and "handle" operators but has a slightly lower footprint.
Closes gh-34201
If the name is set, it is used. If not, the bean name is used. If that's
not set, the convention based name is taken.
Registration failures now throw an IllegalStateException instead of
being logged. DynamicRegistrationBean.setIgnoreRegistrationFailure
can be used to restore the old behavior.
See gh-33911
Remove instance suppliers in bean definitions and depend instead
on reflection. This allows the AOT engine to correctly process
the definitions.
Fixes gh-33763
GraalVM code reachability algorithm is not able to evaluate at build
time that ENABLED static field is always false in a native image,
shipping unreachable code.
Before this commit, building a native image with -H:+PrintAnalysisCallTree
shows that the following methods are included:
- BackgroundPreinitializer$1.<init>(BackgroundPreinitializer):void
- BackgroundPreinitializer$1.run():void
- BackgroundPreinitializer$1.runSafely(Runnable):void
- BackgroundPreinitializer$CharsetInitializer.run():void
- BackgroundPreinitializer$ConversionServiceInitializer.run():void
- BackgroundPreinitializer$JacksonInitializer.run():void
- BackgroundPreinitializer$MessageConverterInitializer.run():void
- BackgroundPreinitializer$ValidationInitializer.run():void
- BackgroundPreinitializer.<clinit>():void
- BackgroundPreinitializer.getOrder():int
- BackgroundPreinitializer.onApplicationEvent(ApplicationEvent):void
- BackgroundPreinitializer.onApplicationEvent(SpringApplicationEvent):void
- BackgroundPreinitializer.performPreinitialization():void
After this commit, only those are included:
- BackgroundPreinitializer.<clinit>():void
- BackgroundPreinitializer.getOrder():int
- BackgroundPreinitializer.onApplicationEvent(ApplicationEvent):void
- BackgroundPreinitializer.onApplicationEvent(SpringApplicationEvent):void
See gh-33240
SharedMetadataReaderFactoryContextInitializer exposes an additional
bean post processor that is only relevant when parsing the bean
factory, auto-configurations in particular. Given that this does not
happen in an AOT-optimized context, this commit excludes the bean
and makes sure the initializer does not do anything at runtime.
Closes gh-33216
AllEncompassingFormHttpMessageConverter already initializes
Jackson ObjectMapper. This commit updates BackgroundPreinitializer
in order to not run JacksonInitializer when
MessageConverterInitializer already takes care of initializing
ObjectMapper.
See gh-33220
This commit ensures that the default locations for GraphQL schema files
and the GraphiQL UI HTML page are included in the native image by
registering resource hints during the AOT phase.
Fixes gh-33208
Spring Integration has introduced a new observationPatterns attribute
on EnableIntegrationManagement. Spring Boot auto-configures
EnableIntegrationManagement so this commit adds a property that
allows users to configure the patterns without declaring the
annotation themselves.
See gh-33099
Commit 29f085bd1a690ff7281e00b3a925e1160850ffbb in Spring Framework
automatically registers hints for enclosing directories. This fixes the
tests to use a contains instead of exact match.
Commit 29f085bd1a690ff7281e00b3a925e1160850ffbb in Spring Framework
automatically registers hints for enclosing directories. This fixes the
tests to expect hints for those directories as well.
Relocate `ConfigurationPropertiesReflectionHintsProcessor` and refactor
it to be a general purpose `BindableRuntimeHintsRegistrar`.
Prior to this commit, `ConfigurationPropertiesReflectionHintsProcessor`
was used to declare binding hints for classes that were bound, but
might be `@ConfigurationProperties`. By moving and renaming the class,
it's now better aligned to the way it's used.
Support for `@NestedConfigurationProperties` has been implemented by
adding a `@Nestable` meta-annotation. This allow us to create the
appropriate hints, without the `Binder` needing to be directly aware of
the `@NestedConfigurationProperties` annotation.
Closes gh-32815
Spring Security now re-applies the authorization rules
to the error page by default. Additionally, it configures
RequestAttributeSecurityContextRepository as the default for
stateless applications allowing those applications to have access
to the original authentication during an error dispatch.
Closes gh-31703