Forward port of issue #43961 to 3.4.x.

Comment From: wilkinsona

This appears to have broken the docs build:

[11:42:08.069] ERROR (asciidoctor): target of xref not found: api:java/com/fasterxml/jackson/core/JsonGenerator.Feature.html
    file: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/spring-mvc.adoc:89
    source: /home/runner/work/spring-boot/spring-boot/.git (branch: 3.4.x <remotes/origin> | start path: spring-boot-project/spring-boot-docs/src/docs/antora)
[11:42:08.074] ERROR (asciidoctor): target of xref not found: api:java/com/fasterxml/jackson/core/JsonParser.Feature.html
    file: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/spring-mvc.adoc:97
    source: /home/runner/work/spring-boot/spring-boot/.git (branch: 3.4.x <remotes/origin> | start path: spring-boot-project/spring-boot-docs/src/docs/antora)
[11:42:08.076] ERROR (asciidoctor): target of xref not found: api:java/com/fasterxml/jackson/annotation/JsonInclude.Include.html
    file: spring-boot-project/spring-boot-docs/src/docs/antora/modules/how-to/pages/spring-mvc.adoc:105
    source: /home/runner/work/spring-boot/spring-boot/.git (branch: 3.4.x <remotes/origin> | start path: spring-boot-project/spring-boot-docs/src/docs/antora)

The docs build for main is similarly affected. 3.3.x isn't affected for some reason.

Comment From: wilkinsona

3.3.x was affected. The docs build has since passed for 3.3.x, 3.4.x, and main.

Comment From: mhalbritter

Huh, weird. It was building fine locally.