rewrite-spring icon indicating copy to clipboard operation
rewrite-spring copied to clipboard

2.4-2.5: schema.sql and data.sql Files

Open fabapp2 opened this issue 3 years ago • 1 comments

Release Notes With Spring Boot 2.5.1 and above, the new SQL initialization properties support detection of embedded datasources for JDBC and R2DBC. By default, SQL database initialization is only performed when using an embedded in-memory database. To always initialize a SQL database, irrespective of its type, set spring.sql.init.mode to always. Similarly, to disable initialization, set spring.sql.init.mode to never.

Condition

  • JDBC and R2DBC datasource in use
  • Database initialization in use (see #296)

Report

Inform user that spring.sql.init.mode is only set for in-memory database and must explicitly set otherwise

Recipe

No Recipe Requires user

fabapp2 avatar Jan 05 '22 12:01 fabapp2

This requires

  • openrewrite/rewrite#1315 and
  • openrewrite/rewrite#1316

pway99 avatar Jan 11 '22 22:01 pway99