Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.
Closes gh-7316
This commit also removes the workaround that required to exclude junit 4
explicitly now that a related issue in JUnit Jupiter has been fixed.
Closes gh-17266
On error cases, the "outcome" tag would be missing from recorded metrics
for the `WebClient`.
This commit fixes this issue and improves the reference documentation by
mentioning the tag values used for error cases, when the client response
is not received (I/O errors, client error, etc).
Fixes gh-17219
This commit changes the default file extension for Freemarker templates
from `*.ftl` to `*.ftlh`. This commit also enables by default the
Freemarker setting `"recognize_standard_file_extensions"` to ensure that
HTML escaping is performed by default in Spring Boot applications.
Applications should adapt to this change by changing the file extensions
of existing templates to `.ftlh`.
Closes gh-15131
As of Spring Data Moore, a new reactive template and the
corresponding repositories support have been added.
This commit auto-configures a `ReactiveElasticsearchTemplate`
with the configuration properties under the
`spring.data.elasticsearch.client.reactive` namespace.
To enable this feature, applications require both Spring Data
Elasticsearch dependencies (typically
`spring-boot-starter-data-elasticsearch`) and dependencies
for a `WebClient` (often `spring-boot-starter-webflux`).
The support for the reactive Elasticsearch repositories is
also provided.
Closes gh-16214
This commit auto-configures the Elasticsearch REST client support
as a template for Spring Data Elasticsearch. As of this commit,
using the transport client is still possible but developers
should migrate.
This commit also removes the deprecated annotation on the
Elasticsearch auto-configuration for the transport client, since
this deprecation notice is already present on the configuration
property.
Closes gh-17024
Closes gh-16542
This commit auto-configures CBOR (see https://cbor.io/) codecs in the
RSocketStrategies, using Jackson binary format support.
The required dependency is added to the rsocket starter. Binary codecs
are well suited for RSocket payloads, so this codec is added first to
the list of codecs (before the JSON one already supported).
Closes gh-16830
This commit auto-configures a prototype `RSocketRequester.Builder` bean
for building requester instances. This builder is pre-configured with
auto-detected `RSocketStrategies` (same as the server side).
Closes gh-16280
Prior to this commit, the audit auto-configuration provided
an `InMemoryAuditEventRepository` bean. This commit changes the auto-config
so that an `AuditEventRepository` is not provided and instead the auto-config
is conditional on the presence of a `AuditEventRepository` bean. This is done
to encourage the use of a custom implementation of `AuditEventRepository`
since the in-memory one is quite limited and not suitable for production.
A flag is available if the auto-configuration needs to be turned off even
in the presence of a bean.
Closes gh-16110
Prior to this commit, the http trace auto-configuration provided
an `InMemoryHttpTraceRepository` bean. This commit changes the auto-config
so that an `HttpTraceRepository` is not provided and instead the auto-config
is conditional on the presence of a `HttpTraceRepository` bean. This is done
to encourage the use of a custom implementation of `HttpTraceRepository`
since the in-memory one is quite limited and not suitable for production.
A flag is available if the auto-configuration needs to be turned off even
in the presence of a bean.
Closes gh-15039
When `management.metrics.web.server.auto-time-requests` is enabled
(default=true), Spring Boot collects metrics on controller methods even
when they are not annotated with `@Timed`.
When this happens, created metrics are based on the default
`@Timed` configuration and there is no way to customize the
configuration of those auto-timed controller metrics.
This commit adds default configurations to auto-timed requests on both
client and server sides.
See gh-15988
This commit reinstates the single-page variant for the Spring Boot
reference documentation.
Now the single and multi-page variants are hosted under the same
`"html"` folder, as `"index.html"` and `"single-index.html"`.
Note that files ending in `"index.html`" are treated as index files by
the spring-doc-resources project and their table of contents do not
display a "Back to index" link.
Fixes gh-16295
As of Spring Data Moore, the Elasticsearch high level REST client is
supported for Spring Data repositories. The transport client is now
deprecated and is likely to be removed in a future Spring Data release.
This commit deprecates the transport client and marks all the associated
configuration properties as deprecated. The Spring Boot starter depends
on the `spring-data-elasticsearch` project, which now depends on both
transport client and high level REST client.
This commit also deprecates the Jest client, as Spring Boot will focus
on supporting the high level REST client and the reactive client
provided by Spring Data - both being in sync with the fast release pace
of Elasticsearch.
Closes gh-15008
Previously, if the `server.use-forward-headers` property
was set to true, X-Forwarded-* headers support was provided
at the server level. The property has been deprecated in favor
of `server.forward-headers-strategy` which can be also be configured
to use Spring's forwarded header support apart from native server support.
Closes gh-5677
This commit adds support for RSocket server applications.
The auto-configuration will either add RSocket support to an existing
Reactor Netty server in a WebFlux application (as a WebSocket endpoint),
or bootstrap a brand new RSocket server instance.
Spring Boot will also auto-configure the Spring Messaging infrastructure
that supports Controller beans with `@MessageMapping` annotated methods.
Fixes gh-16021
This commit also adds tests to ensure that the child
management context works when lazy initialization is
enabled. Also, it adds a BeanFactoryPostProcessor to
the child context so that the server is created and
listening for requests but other beans in the child
context are not created until requested.
See gh-16184
This commit updates Kotlin reference documentation according to
latest features like immutable `@ConfigurationProperties` and
Kotlin BOM support.
See gh-16235
This commit switches the default value for the `spring.jmx.enabled`
configuration property.
JMX is now disabled by default and can be enabled with
`spring.jmx.enabled=true`.
Closes gh-16090
Prior to this commit, the application properties listed in the reference
documentation would be manually managed and updated.
This commit adds a new `spring-boot-configuration-docs` project that
extracts that information from the available JSON metadata and writes
Asciidoctor tables ready for inclusion in the reference documentation.
The `generateConfigurationPropertyTables.groovy` is using this library
and configures the sections and how namespaces should be organized.
Fixes gh-8237
This includes tests for the autoconfiguration using that new property.
The test require the native types for Bolt and embedded in the test
scope, so the Neo4j-OGM native types have been added to managed
dependencies.
The enhanced autoconfiguration throws an
InvalidConfigurationPropertyValueException when native types cannot be
used due to missing dependencies or wrong transport mode.
See gh-15637
Spring Boot provides two separate auto-configurations that can
potentially expose an `AsyncTaskExecutor` implementation so relying on
the presence of a single instance is too weak.
This commit fixes the detection of the AsyncTaskExecutor that can be
used to bootstrap JPA so that a single instance is used and, in the case
more than one exists, the one named `applicationTaskExecutor`.
Closes gh-15447
This commit replaces the Docbook+Asciidoctor documentation toolchain by
a single Asciidoctor generation process.
First, we need to unzip the contents of the Spring Asciidoctor
documentation resources provided by the
`io.spring.docsresources:spring-docs-resources` distribution zip. This
is done in a `/target/refdocs` folder. We then copy all files from
`src/main/asciidoc` to the same location, and then launch the generation
process.
Closes gh-12611
This commit adds an index page for the multi-file HTML version, and
fixed a couple of casing issues (significant words starting with lower
case in headings).
While researching how to get the content from index-docinfo.xml into
the output, I came across the notion of a colophon, which is a good name
for the information in that file. I have consequently changed "Legal"
(which I never liked but couldn't think of a better term for at the
time) to "Colophon".
See gh-12611
Remove Guardfile for now; we might reintroduce it later, but it is
currently out of sync with the documentation changes.
Do not ignore html files in the asciidoc directory as those are needed
for docinfo parts.
See gh-12611
When server and management are at different ports, and when server
requires TLS client authentication, then there is no simple method to
disable TLS client authentication for management port.
This commit adds an additional "none" option to ssl.client-auth.
Example:
server.port=8080
server.ssl.enabled=true
server.ssl.client-auth=need
management.server.port=8081
management.server.ssl.enabled=true
management.server.ssl.client-auth=none
See gh-14985
`@EnableScheduling` detects primarily a suitable `TaskScheduler` in the
context and fallbacks to the presence of a `ScheduledExecutorService` if
that is not the case.
This commit improves the auto-configuration to back off when such
scheduled executor service is present, so that the framework
initialization code can pick it up as usual.
Closes gh-15032
Previously, Couchbase's health was determined by retrieving the bucket info
from the cluster info. This retrieval could take over one minute in some
cases even when Couchbase is health. This latency is too large for a health
check.
The Couchbase team have recommended the of a Cluster#diagnostics instead.
This provides a much lower latency view of the cluster's health. This
commit updates CouchbaseHealthIndicator to use Cluster#diagnostics while
retaining support, in a deprecated form, for the old info-based mechanism
should anyone want to opt back into that in 2.0.x.
Closes gh-14685
This commit auto-configures HTTP resource factories on both Reactor
Netty and Jetty server instances. This creates `ReactorResourceFactory`
and `JettyResourceFactory` beans when necessary - those beans can be
reused and applied by the client auto-configuration in order to share
resources between client and server for optimal performance.
The server auto-configuration has the highest precedence, so from now
on, the auto-configured ResourceFactory bean on the client side will be
skipped if a reactive server is configured.
Closes gh-14495
Add `Ordered` variants of `javax.servlet.Filter` and
`org.springframework.web.server.WebFilter` mainly so that we can
deprecate `FilterRegistrationBean.REQUEST_WRAPPER_FILTER_MAX_ORDER`.
Closes gh-14793
This commit adds a new configuration property
`"spring.webflux.hiddenmethod.filter.enable"` that enables/disables the
`HttpHiddenMethodFilter` in Spring WebFlux.
Closes gh-14520
This commit stops binding the Flyway object directly to the environment
as mutating it will no longer be supported in Flyway 6.
This commit mirrors Flyway's configuration in FlywayProperties for the
most part.
Closes gh-14776
This commit improve the logger-name value hint by adding a group
attribute that can be defined to specify whether logging groups should
be considered.
Closes gh-14748
This commit introduces a dedicated hook point for InfluxDB's http client
builder and retains backward compatibility, in a deprecated fashion, for
looking up a OkHttpClient.Builder bean.
Closes gh-14709
Rework Prometheus push gateway support so that the central class can
be used outside of auto-configuration. The shutdown flags have also
been replaced with a single "shutdown-operation" property since it's
unlikely that both "push" and "delete" will be required.
It's also possible now to supply a `TaskScheduler` to the manager.
See gh-14353