From 61d1fde797c822b6227fe7a9b904faf7fa126fe8 Mon Sep 17 00:00:00 2001 From: Tran Ngoc Nhan Date: Fri, 19 Jul 2024 21:29:31 +0700 Subject: [PATCH 1/2] Update links in reference manual See gh-33245 --- .../pages/core/beans/dependencies/factory-dependson.adoc | 3 +-- .../data-access/transaction/declarative/rolling-back.adoc | 2 +- .../modules/ROOT/pages/integration/observability.adoc | 6 +++--- .../modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-dependson.adoc b/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-dependson.adoc index 17e5e98246bb..f45d528725a2 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-dependson.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-dependson.adoc @@ -2,8 +2,7 @@ = Using `depends-on` If a bean is a dependency of another bean, that usually means that one bean is set as a -property of another. Typically you accomplish this with the <` -element>> in XML-based configuration metadata. However, sometimes dependencies between +property of another. Typically you accomplish this with the xref:core/beans/dependencies/factory-properties-detailed.adoc#beans-ref-element[`` element>] in XML-based configuration metadata. However, sometimes dependencies between beans are less direct. An example is when a static initializer in a class needs to be triggered, such as for database driver registration. The `depends-on` attribute can explicitly force one or more beans to be initialized before the bean using this element diff --git a/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/rolling-back.adoc b/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/rolling-back.adoc index 166fb732431b..d9c936e5158b 100644 --- a/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/rolling-back.adoc +++ b/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/rolling-back.adoc @@ -23,7 +23,7 @@ As of Spring Framework 5.2, the default configuration also provides support for Vavr's `Try` method to trigger transaction rollbacks when it returns a 'Failure'. This allows you to handle functional-style errors using Try and have the transaction automatically rolled back in case of a failure. For more information on Vavr's Try, -refer to the https://docs.vavr.io/#_try[official Vavr documentation]. +refer to the https://vavr-io.github.io/vavr-docs/#_try[official Vavr documentation]. Here's an example of how to use Vavr's Try with a transactional method: [tabs] diff --git a/framework-docs/modules/ROOT/pages/integration/observability.adoc b/framework-docs/modules/ROOT/pages/integration/observability.adoc index 64e5f230ddc6..dfcc8e5cc8df 100644 --- a/framework-docs/modules/ROOT/pages/integration/observability.adoc +++ b/framework-docs/modules/ROOT/pages/integration/observability.adoc @@ -1,7 +1,7 @@ [[observability]] = Observability Support -Micrometer defines an https://micrometer.io/docs/observation[Observation concept that enables both Metrics and Traces] in applications. +Micrometer defines an https://docs.micrometer.io/micrometer/reference/observation.html[Observation concept that enables both Metrics and Traces] in applications. Metrics support offers a way to create timers, gauges, or counters for collecting statistics about the runtime behavior of your application. Metrics can help you to track error rates, usage patterns, performance, and more. Traces provide a holistic view of an entire system, crossing application boundaries; you can zoom in on particular user requests and follow their entire completion across applications. @@ -38,7 +38,7 @@ As outlined xref:integration/observability.adoc[at the beginning of this section |=== NOTE: Observations are using Micrometer's official naming convention, but Metrics names will be automatically converted -https://micrometer.io/docs/concepts#_naming_meters[to the format preferred by the monitoring system backend] +https://docs.micrometer.io/micrometer/reference/concepts/naming.html[to the format preferred by the monitoring system backend] (Prometheus, Atlas, Graphite, InfluxDB...). @@ -368,7 +368,7 @@ This means that during the execution of that task, the ThreadLocals and logging If the application globally configures a custom `ApplicationEventMulticaster` with a strategy that schedules event processing on different threads, this is no longer true. All `@EventListener` methods will be processed on a different thread, outside the main event publication thread. -In these cases, the https://micrometer.io/docs/contextPropagation[Micrometer Context Propagation library] can help propagate such values and better correlate the processing of the events. +In these cases, the https://docs.micrometer.io/context-propagation/reference/[Micrometer Context Propagation library] can help propagate such values and better correlate the processing of the events. The application can configure the chosen `TaskExecutor` to use a `ContextPropagatingTaskDecorator` that decorates tasks and propagates context. For this to work, the `io.micrometer:context-propagation` library must be present on the classpath: diff --git a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc index 32492bcaa7bb..5f40c794e4d5 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc @@ -446,7 +446,7 @@ directly. For example: ---- For more details, see the -https://micrometer.io/docs/contextPropagation[documentation] of the Micrometer Context +https://docs.micrometer.io/context-propagation/reference/[documentation] of the Micrometer Context Propagation library. From a3b737ed002a9f239c90d4c335ffef7aaf764286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Sat, 20 Jul 2024 11:51:49 +0200 Subject: [PATCH 2/2] Polish "Update links in reference manual" See gh-33245 --- framework-docs/antora.yml | 5 ++++- .../core/beans/dependencies/factory-dependson.adoc | 14 ++++++++------ .../transaction/declarative/rolling-back.adoc | 2 +- .../ROOT/pages/integration/observability.adoc | 6 +++--- .../ROOT/pages/web/webmvc/mvc-ann-async.adoc | 5 ++--- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/framework-docs/antora.yml b/framework-docs/antora.yml index 6bc869aee70d..3623a374aa9e 100644 --- a/framework-docs/antora.yml +++ b/framework-docs/antora.yml @@ -70,6 +70,8 @@ asciidoc: kotlin-coroutines-api: '{kotlin-site}/api/kotlinx.coroutines' kotlin-github-org: 'https://github.com/Kotlin' kotlin-issues: 'https://youtrack.jetbrains.com/issue' + micrometer-docs: 'https://docs.micrometer.io/micrometer/reference' + micrometer-context-propagation-docs: 'https://docs.micrometer.io/context-propagation/reference' reactive-streams-site: 'https://www.reactive-streams.org' reactive-streams-spec: 'https://github.com/reactive-streams/reactive-streams-jvm/blob/master/README.md#specification' reactor-github-org: 'https://github.com/reactor' @@ -87,4 +89,5 @@ asciidoc: stackoverflow-questions: '{stackoverflow-site}/questions' stackoverflow-spring-tag: "{stackoverflow-questions}/tagged/spring" stackoverflow-spring-kotlin-tags: "{stackoverflow-spring-tag}+kotlin" - testcontainers-site: 'https://www.testcontainers.org' \ No newline at end of file + testcontainers-site: 'https://www.testcontainers.org' + vavr-docs: 'https://vavr-io.github.io/vavr-docs' \ No newline at end of file diff --git a/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-dependson.adoc b/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-dependson.adoc index f45d528725a2..bbc4c0ef20b7 100644 --- a/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-dependson.adoc +++ b/framework-docs/modules/ROOT/pages/core/beans/dependencies/factory-dependson.adoc @@ -2,12 +2,14 @@ = Using `depends-on` If a bean is a dependency of another bean, that usually means that one bean is set as a -property of another. Typically you accomplish this with the xref:core/beans/dependencies/factory-properties-detailed.adoc#beans-ref-element[`` element>] in XML-based configuration metadata. However, sometimes dependencies between -beans are less direct. An example is when a static initializer in a class needs to be -triggered, such as for database driver registration. The `depends-on` attribute can -explicitly force one or more beans to be initialized before the bean using this element -is initialized. The following example uses the `depends-on` attribute to express a -dependency on a single bean: +property of another. Typically you accomplish this with the +xref:core/beans/dependencies/factory-properties-detailed.adoc#beans-ref-element[`` element>] +in XML-based configuration metadata. However, sometimes dependencies between beans are +less direct. An example is when a static initializer in a class needs to be triggered, +such as for database driver registration. The `depends-on` attribute can explicitly force +one or more beans to be initialized before the bean using this element is initialized. +The following example uses the `depends-on` attribute to express a dependency on a single +bean: [source,xml,indent=0,subs="verbatim,quotes"] ---- diff --git a/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/rolling-back.adoc b/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/rolling-back.adoc index d9c936e5158b..dca97fd50248 100644 --- a/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/rolling-back.adoc +++ b/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/rolling-back.adoc @@ -23,7 +23,7 @@ As of Spring Framework 5.2, the default configuration also provides support for Vavr's `Try` method to trigger transaction rollbacks when it returns a 'Failure'. This allows you to handle functional-style errors using Try and have the transaction automatically rolled back in case of a failure. For more information on Vavr's Try, -refer to the https://vavr-io.github.io/vavr-docs/#_try[official Vavr documentation]. +refer to the {vavr-docs}/#_try[official Vavr documentation]. Here's an example of how to use Vavr's Try with a transactional method: [tabs] diff --git a/framework-docs/modules/ROOT/pages/integration/observability.adoc b/framework-docs/modules/ROOT/pages/integration/observability.adoc index dfcc8e5cc8df..28fe88fdbc3c 100644 --- a/framework-docs/modules/ROOT/pages/integration/observability.adoc +++ b/framework-docs/modules/ROOT/pages/integration/observability.adoc @@ -1,7 +1,7 @@ [[observability]] = Observability Support -Micrometer defines an https://docs.micrometer.io/micrometer/reference/observation.html[Observation concept that enables both Metrics and Traces] in applications. +Micrometer defines an {micrometer-docs}/observation.html[Observation concept that enables both Metrics and Traces] in applications. Metrics support offers a way to create timers, gauges, or counters for collecting statistics about the runtime behavior of your application. Metrics can help you to track error rates, usage patterns, performance, and more. Traces provide a holistic view of an entire system, crossing application boundaries; you can zoom in on particular user requests and follow their entire completion across applications. @@ -38,7 +38,7 @@ As outlined xref:integration/observability.adoc[at the beginning of this section |=== NOTE: Observations are using Micrometer's official naming convention, but Metrics names will be automatically converted -https://docs.micrometer.io/micrometer/reference/concepts/naming.html[to the format preferred by the monitoring system backend] +{micrometer-docs}/concepts/naming.html[to the format preferred by the monitoring system backend] (Prometheus, Atlas, Graphite, InfluxDB...). @@ -368,7 +368,7 @@ This means that during the execution of that task, the ThreadLocals and logging If the application globally configures a custom `ApplicationEventMulticaster` with a strategy that schedules event processing on different threads, this is no longer true. All `@EventListener` methods will be processed on a different thread, outside the main event publication thread. -In these cases, the https://docs.micrometer.io/context-propagation/reference/[Micrometer Context Propagation library] can help propagate such values and better correlate the processing of the events. +In these cases, the {micrometer-context-propagation-docs}/[Micrometer Context Propagation library] can help propagate such values and better correlate the processing of the events. The application can configure the chosen `TaskExecutor` to use a `ContextPropagatingTaskDecorator` that decorates tasks and propagates context. For this to work, the `io.micrometer:context-propagation` library must be present on the classpath: diff --git a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc index 5f40c794e4d5..d8b00ce3f7eb 100644 --- a/framework-docs/modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc +++ b/framework-docs/modules/ROOT/pages/web/webmvc/mvc-ann-async.adoc @@ -445,9 +445,8 @@ directly. For example: } ---- -For more details, see the -https://docs.micrometer.io/context-propagation/reference/[documentation] of the Micrometer Context -Propagation library. +For more details, see the {micrometer-context-propagation-docs}/[documentation] of the +Micrometer Context Propagation library.