Skip to content

Manual metadata has an outdated reference to spring.datasource.initialization-mode #30435

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

Closed
goafabric opened this issue Mar 25, 2022 · 4 comments
Assignees
Labels
type: documentation A documentation update
Milestone

Comments

@goafabric
Copy link

During the Upgrade of 3.0-M2 I noticed a strange behaviour concerning the Rollout of Database Scripts.
While working with H2 .. they did not with PostgreSQL.
During Debugging i finally found out the root cause.

While the Changelog for M1 explictly mentions the property change for
"spring.sql.init.schema-locations"
it does NOT mention the change for
"spring.sql.init.mode"

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0.0-M1-Configuration-Changelog

This was quiet confusing and I now also found the Changelog for 2.5.0 which announced the Deprecation
of the former "spring.datasource" => "spring.sql.init" properties

But as it was only a Deprecation .. i never stumbled upon this.

So long story short .. to avoid confusion for other people,
please also document the change for
"spring.sql.init.mode=always" near the Spring Boot 3.0 Milestone

thx

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 25, 2022
@wilkinsona
Copy link
Member

Thanks for raising this, @goafabric.

But as it was only a Deprecation .. i never stumbled upon this

Are you using an IDE with Spring Boot support? Netbeans (with the right plugin), Eclipse (with Spring Tools) and IntelliJ (perhaps not community edition) should all warn you when you're using deprecated properties in your application.properties or .yaml files.

@wilkinsona
Copy link
Member

@snicoll Could this be a bug in the changelog generator? The property's marked as deprecated with a replacement in 2.7.0-M1:

@Deprecated
@DeprecatedConfigurationProperty(replacement = "spring.sql.init.mode")
public org.springframework.boot.jdbc.DataSourceInitializationMode getInitializationMode() {
return this.initializationMode;
}

These properties should have been removed in 2.7 (following their deprecation in 2.5). I've opened #30442 for that.

@goafabric
Copy link
Author

goafabric commented Mar 26, 2022

Thanks for raising this, @goafabric.

But as it was only a Deprecation .. i never stumbled upon this

Are you using an IDE with Spring Boot support? Netbeans (with the right plugin), Eclipse (with Spring Tools) and IntelliJ (perhaps not community edition) should all warn you when you're using deprecated properties in your application.properties or .yaml files.

Thanks for the fast reaction .. I am using Intellij .. but the Community Edition, which unfortunately does not support application.properties
But this was actually a good hint .. just found out that there is now at least one plugin that can add this functionality ..

@snicoll
Copy link
Member

snicoll commented Apr 3, 2022

@wilkinsona that's not a bug in the changelog generator. There is still a reference to spring.datasource.initialization-mode in manual metadata. I guess we could argue that if the left side is deprecated and the right side is not, it should be marked as "undeprecated" but we don't have such a section in the changelog. I'll update the changelog for M1 manually and we can use this issue to remove what's left of it.

@snicoll snicoll changed the title Spring-Boot-3.0.0-M1-Configuration-Changelog Update for "spring.sql.init.mode" Manual metadata has an outdated reference to spring.datasource.initialization-mode Apr 3, 2022
@snicoll snicoll added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 3, 2022
@snicoll snicoll added this to the 3.0.0-M3 milestone Apr 3, 2022
@snicoll snicoll self-assigned this Apr 3, 2022
@snicoll snicoll closed this as completed in 535a9b7 Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

4 participants