A few months ago, consultant and prolific open source contributor Maciej Walkowiak, of Spring Cloud AWS and just fame, wrote about clearing test databases between integration tests with Spring Boot and Flyway.
The recipe / pattern for restoring a test database to its previous state (i.e. the state before a specific integration test has been executed) outlined in that article should come in handy to anyone working with Spring Boot. Moreover, the basic concept is generic enough to be applied to another set of underlying technologies (e.g., Spring in general or Java / Jakarta EE and Liquibase).