Skip to content

Enhance spring.datasource.initialization-mode property description #21121

@nikmanzotti

Description

@nikmanzotti

As discussed here #20920 and here #21077 with @snicoll, we think that the description may of the spring.datasource.initialization-mode could be improved.

I understand that the description is generated from the code comment, which states:

Initialize the datasource with available DDL and DML scripts.

In the current docs dedicated section, the description field is empty (I've opened another issue for this specific problem, see #21131).

I have reviewed my initial enhancement proposal after viewing the original description and receiving some feedback.

I've done some research, in the Spring Framework documentation they use "DataSource implementations" and "Database types" to refer to the actual DBMS (e.g. H2, Derby, HSQL - see 3.2. Package Hierarchy, 3.9. Embedded Database Support). I suppose it's a wording valid for both embedded and "non-embedded" databases, so not suitable for the values of the spring.datasource.initialization-mode property.

Updated proposal:

Initialize the embedded datasource with available DDL and DML scripts. Use always to initialize any datasource.

This avoids the use of "type of datasource", and describes the usage of always as a value, but I'm still not sure if is it clearly understandable.

Also, I was guessing: is there a way to disable datasource initialization, even if the DDL and DML scripts are present?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions