mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '2.3.x'
Closes gh-21918
This commit is contained in:
commit
ce4ef5ed81
@ -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-rest-version": versionConstraints["org.springframework.data:spring-data-rest-core"],
|
||||||
"spring-data-solr-version": versionConstraints["org.springframework.data:spring-data-solr"],
|
"spring-data-solr-version": versionConstraints["org.springframework.data:spring-data-solr"],
|
||||||
"spring-framework-version": versionConstraints["org.springframework:spring-core"],
|
"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-integration-version": versionConstraints["org.springframework.integration:spring-integration-core"],
|
||||||
"spring-security-version": versionConstraints["org.springframework.security:spring-security-core"],
|
"spring-security-version": versionConstraints["org.springframework.security:spring-security-core"],
|
||||||
"spring-webservices-version": versionConstraints["org.springframework.ws:spring-ws-core"]
|
"spring-webservices-version": versionConstraints["org.springframework.ws:spring-ws-core"]
|
||||||
|
@ -86,6 +86,7 @@
|
|||||||
:spring-initializr-docs: https://docs.spring.io/initializr/docs/current/reference/html
|
:spring-initializr-docs: https://docs.spring.io/initializr/docs/current/reference/html
|
||||||
:spring-integration: https://spring.io/projects/spring-integration
|
:spring-integration: https://spring.io/projects/spring-integration
|
||||||
:spring-integration-docs: https://docs.spring.io/spring-integration/docs/{spring-integration-version}/reference/html/
|
: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-restdocs: https://spring.io/projects/spring-restdocs
|
||||||
:spring-security: https://spring.io/projects/spring-security
|
:spring-security: https://spring.io/projects/spring-security
|
||||||
:spring-security-docs: https://docs.spring.io/spring-security/site/docs/{spring-security-version}/reference/html5/
|
:spring-security-docs: https://docs.spring.io/spring-security/site/docs/{spring-security-version}/reference/html5/
|
||||||
|
@ -1820,7 +1820,7 @@ Spring Boot registers the following core metrics when applicable:
|
|||||||
** Number of classes loaded/unloaded
|
** Number of classes loaded/unloaded
|
||||||
* CPU metrics
|
* CPU metrics
|
||||||
* File descriptor 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
|
* 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
|
* 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
|
* 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]]
|
[[production-ready-metrics-custom]]
|
||||||
=== Registering custom metrics
|
=== Registering custom metrics
|
||||||
To register custom metrics, inject `MeterRegistry` into your component, as shown in the following example:
|
To register custom metrics, inject `MeterRegistry` into your component, as shown in the following example:
|
||||||
|
@ -5728,7 +5728,7 @@ IMPORTANT: Properties set in this way override any configuration item that Sprin
|
|||||||
==== Testing with Embedded Kafka
|
==== Testing with Embedded Kafka
|
||||||
Spring for Apache Kafka provides a convenient way to test projects with an embedded Apache Kafka broker.
|
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.
|
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.
|
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:
|
There are several ways to do that:
|
||||||
|
Loading…
Reference in New Issue
Block a user