Merge branch '2.3.x'

Closes gh-21918
This commit is contained in:
Stephane Nicoll 2020-06-15 09:19:15 +02:00
commit ce4ef5ed81
4 changed files with 11 additions and 2 deletions

View File

@ -189,6 +189,7 @@ tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
"spring-data-rest-version": versionConstraints["org.springframework.data:spring-data-rest-core"],
"spring-data-solr-version": versionConstraints["org.springframework.data:spring-data-solr"],
"spring-framework-version": versionConstraints["org.springframework:spring-core"],
"spring-kafka-version": versionConstraints["org.springframework.kafka:spring-kafka"],
"spring-integration-version": versionConstraints["org.springframework.integration:spring-integration-core"],
"spring-security-version": versionConstraints["org.springframework.security:spring-security-core"],
"spring-webservices-version": versionConstraints["org.springframework.ws:spring-ws-core"]

View File

@ -86,6 +86,7 @@
:spring-initializr-docs: https://docs.spring.io/initializr/docs/current/reference/html
:spring-integration: https://spring.io/projects/spring-integration
:spring-integration-docs: https://docs.spring.io/spring-integration/docs/{spring-integration-version}/reference/html/
:spring-kafka-docs: https://docs.spring.io/spring-kafka/docs/{spring-kafka-version}/reference/html/
:spring-restdocs: https://spring.io/projects/spring-restdocs
:spring-security: https://spring.io/projects/spring-security
:spring-security-docs: https://docs.spring.io/spring-security/site/docs/{spring-security-version}/reference/html5/

View File

@ -1820,7 +1820,7 @@ Spring Boot registers the following core metrics when applicable:
** Number of classes loaded/unloaded
* CPU metrics
* File descriptor metrics
* Kafka consumer metrics
* Kafka consumer and producer metrics
* Log4j2 metrics: record the number of events logged to Log4j2 at each level
* Logback metrics: record the number of events logged to Logback at each level
* Uptime metrics: report a gauge for uptime and a fixed gauge representing the application's absolute start time
@ -2069,6 +2069,13 @@ Auto-configuration will enable the instrumentation of all available RabbitMQ con
[[production-ready-metrics-kafka]]
==== Kafka Metrics
Auto-configuration will register a `MicrometerConsumerListener` and `MicrometerProducerListener` for the auto-configured consumer factory and producer factory respectively.
For more details refer to {spring-kafka-docs}#micrometer-native[Micrometer Native Metrics] section of the Spring Kafka documentation.
[[production-ready-metrics-custom]]
=== Registering custom metrics
To register custom metrics, inject `MeterRegistry` into your component, as shown in the following example:

View File

@ -5728,7 +5728,7 @@ IMPORTANT: Properties set in this way override any configuration item that Sprin
==== Testing with Embedded Kafka
Spring for Apache Kafka provides a convenient way to test projects with an embedded Apache Kafka broker.
To use this feature, annotate a test class with `@EmbeddedKafka` from the `spring-kafka-test` module.
For more information, please see the Spring for Apache Kafka https://docs.spring.io/spring-kafka/docs/current/reference/html/#embedded-kafka-annotation[reference manual].
For more information, please see the Spring for Apache Kafka {spring-kafka-docs}#embedded-kafka-annotation[reference manual].
To make Spring Boot auto-configuration work with the aforementioned embedded Apache Kafka broker, you need to remap a system property for embedded broker addresses (populated by the `EmbeddedKafkaBroker`) into the Spring Boot configuration property for Apache Kafka.
There are several ways to do that: