-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Enhance spring.datasource.initialization-mode property description #21121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for the suggestion. I don't like this proposal as it is documented towards its default value.
This question probably explains why you are raising this issue in the first place. The three values for that property are documented. I think rather than being imperative about the fact the datasource is going to be initialized, we should update the description to focus that this controls the "mode" of initialization. |
Thanks for the feedback! You are right, I am quite new to Spring Boot (to the whole programming world, actually) and I have still many things to understand and learn. Being the description related only to the default value, I agree with you. This is an updated proposal, but I am still not sure it makes things clear enough:
P.S. do you think it would be worth adding a Note block (or something else) to explain where the complete documentation of the properties and their values could be found? It would be aimed mostly at beginners, and I am not sure it is something easy to generalize. For instance, I can see comments for LiquibaseProperties attributes looking at the Java code, but I wasn't able to find them in the class Javadoc. |
Thanks for the feedback but that's still a description towards its default value. If you set the value of this property to
Let's not start two different topics in one issue please as it makes it very hard to understand what is going on. Feel free to join the community on Gitter if you want to chat about an idea or create a separate issue. Having said that, descriptions are available in your IDE and in the appendix of the reference guide. I would argue that |
Uh oh!
There was an error while loading. Please reload this page.
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:
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:
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?
The text was updated successfully, but these errors were encountered: