rewrite-spring
rewrite-spring copied to clipboard
2.4-2.5: schema.sql and data.sql Files
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
This requires
- openrewrite/rewrite#1315 and
- openrewrite/rewrite#1316