Use Flow files with Spring

Liquibase Flow Files let you create portable, platform-independent Liquibase workflows that can run anywhere without modification. This includes Jenkins, GitHub actions, a developers desktop, or any other CI/CD support tool. Flow Files with full Spring Boot integration support added are available in Liquibase 5.1 and later.

Before you begin

Procedure

1

Ensure your pom file is configured.

Be sure to replace these items within your POM file so it works with your specific environment.

POM file item

Replacement

<groupId>com.example</groupId>

Replace with your organization

<artifactId>demo-commercial</artifactId>

Replace with your project name

<version>0.0.1-SNAPSHOT</version>

Replace with your version

<name>demo-commercial</name>

Replace with your project name

<description>Demo project for Spring Boot</description>

Replace with your description

<java.version>25</java.version>

Replace with your Java version

<groupId>com.h2database</groupId>

Replace with your database

<artifactId>h2</artifactId>

Replace with your driver

<version>3.5.7</version>

You may need to match your existing Spring Boot version

Example POM file
loading
2

Save your flow file in your Spring project

We recommend storing the file in the same location you would store your changelog.

Example:

WIN 20250121 17 13 31 Pro

3

Add this code to your Spring application.properties file.

Configure your application.properties file within Spring to recognize the Liquibase Flow file

loading
4

Configure your database connection

Ensure your liquibase.properties file contains your connection credentials that the Flow file will use.

loading
5

Now that your project is configured, start the Spring Boot application using Maven:

loading

The application will compile and launch, making the Liquibase integration available.

Results

Spring can now use all Liquibase Flow file functionality.