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

Comment From: wilkinsona

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.

Comment From: wilkinsona

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

https://github.com/spring-projects/spring-boot/blob/331ec4a195e249b21f212e57917a98f4591d7a75/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceProperties.java#L394-L398

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

Comment From: goafabric

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 ..

Comment From: snicoll

@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.