Skip to content

docs: update few documentation issues #50757

@doehyunbaek

Description

@doehyunbaek

I found several documentation inconsistencies that still appear to be present on current main as of 8ccf2e9.

1. Cloud deployment docs use the wrong forward headers property

The cloud deployment page tells users to set spring.forward-headers-strategy:

If that is not the case for your specific platform, set `spring.forward-headers-strategy` to `none`.

But the actual property is server.forward-headers-strategy, so the documented setting has no effect.

Introduced by:

2. JPA bootstrap docs still say lazy mode uses the async task executor

The SQL/JPA docs say deferred or lazy bootstrapping uses the context's AsyncTaskExecutor, if any:

Spring Data JPA repositories support three different modes of bootstrapping: default, deferred, and lazy.
To enable deferred or lazy bootstrapping, set the configprop:spring.data.jpa.repositories.bootstrap-mode[] property to `deferred` or `lazy` respectively.
When using deferred or lazy bootstrapping, the auto-configured javadoc:org.springframework.boot.jpa.EntityManagerFactoryBuilder[] will use the context's javadoc:org.springframework.core.task.AsyncTaskExecutor[], if any, as the bootstrap executor.

But the behavior changed so that the bootstrap executor customization applies to deferred mode, not lazy mode, and deferred mode requires an executor.

Introduced by:

3. Optional binding docs still describe the old null behavior

The external configuration docs say an Optional property with no value is bound as null rather than an empty Optional:

NOTE: The use of javadoc:java.util.Optional[] with javadoc:org.springframework.boot.context.properties.ConfigurationProperties[format=annotation] is not recommended as it is primarily intended for use as a return type.
As such, it is not well-suited to configuration property injection.
For consistency with properties of other types, if you do declare an javadoc:java.util.Optional[] property and it has no value, `null` rather than an empty javadoc:java.util.Optional[] will be bound.

But the binding behavior changed to use an empty Optional.

Introduced by:

I have prepared a fixes in my fork in case you need them:

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions