Now that Spring Boot supports Freemarker for both Spring MVC and Spring
WebFlux, the dedicated starter should not pull the Web starter
transitively and let developers manually choose the web stack.
Closes gh-11246
Previously, a `ReactiveHealthIndicator` bean was exposed to define the
health indicator to use for the reactive endpoint. Having it exposed as
a bean has the side effect that the regular `HealthIndicator` composite
is picked up and a "reactive" entry is added to the health details.
This commit creates such indicator internally as it should be.
Closes gh-11222
Restore `spring-boot-maven-plugin` dependency in `maven-shade-plugin`
starter configuration. Required so that the shade plugin can use
`PropertiesMergingResourceTransformer` if wanted.
Fixes gh-11200
Rather than using two properties to enable or disable reactive and
imperative repositories for a particular store, this commit introduces
a new repository type condition that's backed by a single
spring.data.<store>.repositories.type property. The type can be
auto (automatically enables whatever's available), imperative (enables
imperative repositories), none (enables nothing), or reactive (enables
reactive repositories). The default is auto.
Repositories do not have a reactive option (such as JPA) continue to
have a spring.data.<store>.repositories.enabled property that takes a
boolean value.
Closes gh-11134
If the WebFlux handler commits the response but still sends an error
signal in the reactive pipeline, Spring Boot error handling should not
try to handle that error: once committed, it is impossible to change the
response status or the response headers. Writing to the body might also
lead to invalid responses.
This commit skips error handling if the response is committed and
delegates to Spring Framework's `HttpWebHandlerAdapter` which will log
the error.
Fixes gh-11168
This commit adds support for basic auto-configuration for the Freemarker
template engine in WebFlux.
A few configuration properties in the `spring.freemarker.*` namespace
aren't supported yet, since they mostly apply to MVC (Servlet request
and session attributes).
Closes gh-10094
Previously, a dependency on jackson-module-kotlin with Kotlin excluded
was added to spring-boot-starter-json. This gave Kotlin users a smooth
experience with Jackson and JSON at minimal, we thought, cost to other
users. We have since learned that this arrangement causes a
ClassNotFoundException at runtime when Jackson is configured to find
modules via the service loader. This makes the cost of including
jackson-module-kotlin to high for non-Kotlin users so this commit
removes it.
Closes gh-11133
Elasticsearch server requires log4j-core but we don't want the entire
module to have a test dependency on log4j-core as it already uses
Logback. This commit uses the modified class path runner to make
log4j-core available specifically to the Elasticsearch-related tests.
See gh-11166
Prior to this change, the dash was duplicated. For example
"test--systemEnvironment". This commit removes the redundant dash
and corrects the assertion in the test that should have caught the
problem.
See gh-11156
This change replaces fallback logic in PropertiesConfigAdapter and its
descendants such that instead of falling back to default "empty" config
it delegates to superinterface default implementation of the same class.
This allows default implementation to call back to other properties,
like DatadogConfig.uri() does.
See gh-11135
This commit introduces Kotlin extensions similar to the RestOperations
ones in order to be able to take advantage of Kotlin reified type
parameters for example.
See gh-11039
Update `Binder` so that if a property exists, but it cannot be converted
to required type, bean binding is attempted.
Prior to this commit, if a user happened to have an environment
variable named `SERVER` the binder would fail when trying to directly
convert its `String` value into a `ServerProperties`
Fixes gh-10945
Drop the status endpoint and merge functionality back into the health
endpoint. The `management.endpoint.health.show-details` property can
be used to change if full details, or just the status is displayed.
Fixes gh-11113
Rename `reactive-repositories` to `reactiverepositories` and replace
`spring.resources.cache-control` with `spring.resources.cache.control`.
Fixes gh-11090
Previously, custom Hibernate naming strategies could only be
configured via properties. This allowed a fully-qualified classname to
be specified, but did not allow a naming strategy instance to be used.
This commit updates HibernateJpaConfiguration to use
ImplicitNamingStrategy and PhysicalNamingStrategy beans if they
exist. If both a bean exists and the equivalent property has been set,
the bean wins.
This commit adds several configuration keys for customizing the
"Cache-Control" HTTP response header when serving static resources.
New keys are located in the "spring.resources.cache-control.*"
namespace; anything configured there will prevail on existing
"spring.resources.cache-period=" values, so as to mirror Spring MVC's
behavior.
Fixes gh-9432
Update appropriate configuration properties to use the `Duration`
type, rather than an ad-hoc mix of milliseconds or seconds.
Configuration properties can now be defined in a consistent and readable
way. For example `server.session.timeout=5m`.
Properties that were previously declared using seconds are annotated
with `@DurationUnit` to ensure a smooth upgrade experience. For example
`server.session.timeout=20` continues to mean 20 seconds.
Fixes gh-11080
Update the configuration properties annotation processor to deal
with `Duration` based default values. For example a field that
defaults to `Duration.ofSeconds(10)` will have a meta-data default
value of `10s`.
See gh-11080
Update `StringToDurationConverter` so that the suffix is optional and
values such as `100`, `+100`, `-100` are assumed to be milliseconds.
Also add support for `@DurationUnit` to allow the unit to be changed
on a per-field basis (allowing for better back-compatibility).
Closes gh-11078
Extend `BinderConversionService` to support `Duration` parsing of
the more readable `10s` form (equivalent to 10 seconds). Standard
ISO-8601 parsing also remains as an option.
Fixes gh-11078
Add `spring.kafka.producer.transaction-id-prefix` property that will be
passed to `DefaultKafkaProducerFactory.setTransactionIdPrefix(...)`
See gh-11076
This commit updates `SessionAutoConfiguration` to ensure it is processed
after `MongoDataAutoConfiguration` and
`MongoReactiveDataAutoConfiguration`, instead of `MongoAutoConfiguration`
and `MongoReactiveAutoConfiguration`. This is required in order for
MongoDB Session auto-configuration to work, since
`MongoSessionConfiguration` and `MongoReactiveSessionConfiguration` are
conditional on `MongoOperations` and `ReactiveMongoOperations` beans,
respectively.
Closes gh-11054
Update `RedisProperties` to use an actual String[] for sentinal nodes
rather than a simple String. This allows us to lean on the updated
binder to automatically trim the elements.
Fixes gh-11029
Update endpoint code to provide cleaner separation of concerns.
Specifically, the top level endpoint package is no longer aware of
the fact that JMX and HTTP are ultimately used to expose endpoints.
Caching concerns have also been abstracted behind a general purpose
`OperationMethodInvokerAdvisor` interface.
Configuration properties have been refined to further enforce
separation. The `management.endpoint.<name>` prefix provides
configuration for a single endpoint (including enable and cache
time-to-live). These properties are now technology agnostic (they
don't include `web` or `jmx` sub properties).
The `management.endpoints.<technology>` prefix provide exposure specific
configuration. For example, `management.endpoints.web.path-mapping`
allow endpoint URLs to be changed.
Endpoint enabled/disabled logic has been simplified so that endpoints
can't be disabled per exposure technology. Instead a filter based
approach is used to allow refinement of what endpoints are exposed over
a given technology.
Fixes gh-10176