This page lists the SQL database engines officially supported by AWE Framework and shows, at a glance, how to configure each one for JDBC and Flyway.
AWE uses Spring Boot + JDBC and Flyway. For each engine you need:
- A JDBC driver on the classpath.
- (When using Flyway) the corresponding Flyway database module on the classpath.
- A JDBC URL and credentials.
- Optionally, vendor-specific migration scripts under
classpath:db/migration/{vendor}where{vendor}is resolved from the JDBC URL.
Tip: AWE sets the Flyway locations to
classpath:db/migration/{vendor}so you can keep one set of migrations per database vendor. Modules listed inawe.database.migration-modulesare applied to the same datasource.
Quick comparison
| Engine | Vendor key | JDBC driver | Flyway module | Example URL |
|---|---|---|---|---|
| 🧪 HSQLDB | hsqldb | org.hsqldb:hsqldb | org.flywaydb:flyway-database-hsqldb | jdbc:hsqldb:mem:awetestdb |
| ⚡ H2 | h2 | com.h2database:h2 | bundled in Flyway core (no extra module in most versions) | jdbc:h2:mem:awetestdb;MODE=MySQL |
| 🐬 MySQL/MariaDB | mysql | com.mysql:mysql-connector-j | org.flywaydb:flyway-mysql | jdbc:mysql://localhost/awetestdb |
| 🐘 PostgreSQL | postgresql | org.postgresql:postgresql | org.flywaydb:flyway-database-postgresql | jdbc:postgresql://localhost/awetestdb |
| 🪟 SQL Server | sqlserver | com.microsoft.sqlserver:mssql-jdbc | org.flywaydb:flyway-sqlserver | jdbc:sqlserver://localhost:1433;databaseName=awetestdb |
| 🏛️ Oracle | oracle | com.oracle.database.jdbc:ojdbc11 | org.flywaydb:flyway-database-oracle (Teams in some versions) | jdbc:oracle:thin:@//localhost:1521/XEPDB1 |
Copy‑paste snippets
Use the tabs to pick your database and copy the minimal Maven and application.properties examples.
- HSQLDB 🧪
- H2 ⚡
- MySQL 🐬
- PostgreSQL 🐘
- SQL Server 🪟
- Oracle 🏛️
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-hsqldb</artifactId>
</dependency>
spring.datasource.url=jdbc:hsqldb:mem:awetestdb
spring.datasource.driver-class-name=org.hsqldb.jdbcDriver
spring.flyway.enabled=true
# spring.flyway.locations=classpath:db/migration/{vendor}
awe.database.migration-modules=AWE,SCHEDULER,NOTIFIER
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
spring.datasource.url=jdbc:h2:mem:awetestdb;MODE=MySQL
spring.datasource.driver-class-name=org.h2.Driver
spring.flyway.enabled=true
# spring.flyway.locations=classpath:db/migration/{vendor}
awe.database.migration-modules=AWE,SCHEDULER,NOTIFIER
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
</dependency>
spring.datasource.url=jdbc:mysql://localhost/awetestdb
spring.datasource.username=root
spring.datasource.password=secret
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.flyway.enabled=true
# spring.flyway.locations=classpath:db/migration/{vendor}
awe.database.migration-modules=AWE,SCHEDULER,NOTIFIER
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
</dependency>
spring.datasource.url=jdbc:postgresql://localhost/awetestdb
spring.datasource.username=postgres
spring.datasource.password=secret
spring.datasource.driver-class-name=org.postgresql.Driver
spring.flyway.enabled=true
# spring.flyway.locations=classpath:db/migration/{vendor}
awe.database.migration-modules=AWE,SCHEDULER,NOTIFIER
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-sqlserver</artifactId>
</dependency>
spring.datasource.url=jdbc:sqlserver://localhost:1433;databaseName=awetestdb
spring.datasource.username=sa
spring.datasource.password=Secret!123
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.flyway.enabled=true
# spring.flyway.locations=classpath:db/migration/{vendor}
awe.database.migration-modules=AWE,SCHEDULER,NOTIFIER
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-oracle</artifactId>
</dependency>
spring.datasource.url=jdbc:oracle:thin:@//localhost:1521/XEPDB1
spring.datasource.username=system
spring.datasource.password=secret
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
spring.flyway.enabled=true
# spring.flyway.locations=classpath:db/migration/{vendor}
awe.database.migration-modules=AWE,SCHEDULER,NOTIFIER
Testing against each database
The AWE integration tests run every server database in a Testcontainers container, so the only
requirement is a running Docker. HSQLDB and H2 run embedded. A Spring test class chooses its database with one annotation from
awe-testing, and the module needs the JDBC driver of that database:
@SpringBootTest
@AweDatabaseTest(TestDatabase.POSTGRESQL) // HSQLDB, H2, MYSQL, POSTGRESQL, SQLSERVER, ORACLE
class MyQueryIT { }
@AweDatabaseTest(value = TestDatabase.MYSQL, flyway = true) // Flyway instead of the schema and data scripts
class MyFlywayIT { }
The container starts once per test run, and the annotation writes the spring.datasource.* connection (and the script or Flyway
settings) for it. The images are pinned in one file, awe-framework/awe-testing/src/main/resources/awe-testing-images.properties.
| Engine | Image | Notes |
|---|---|---|
| MySQL | mysql | |
| PostgreSQL | postgres | |
| SQL Server | mcr.microsoft.com/mssql/server | Needs AWE_TESTING_SQLSERVER_ACCEPT_EULA=true (or -Dawe.testing.sqlserver.accept-eula=true) to accept the Microsoft licence. The image is amd64-only. |
| Oracle | gvenzl/oracle-free | Large image (about 6 GB): the first run spends most of its time pulling it. |
To run the suites of a database from the AWE repository, see "Database integration tests" in CONTRIBUTING.md.
Flyway script layout
Place vendor-specific scripts under:
classpath:db/migration/{vendor}
AWE’s own modules follow that convention. For example:
- AWE core:
awe-starters/awe-spring-boot-starter/src/main/resources/db/migration/mysqland.../postgresql. - Scheduler:
awe-starters/awe-scheduler-spring-boot-starter/src/main/resources/db/migration/{vendor}. - Notifier:
awe-starters/awe-notifier-spring-boot-starter/src/main/resources/db/migration/{vendor}.
Scripts per module are named with the module prefix and version, for example:
AWE_V1.0.0__Init_awe_schema.sql
SCHEDULER_V1.0.0__Init_scheduler.sql
NOTIFIER_V1.0.0__Init_notifier.sql
Minimal global configuration
Enable Flyway and list the modules whose migrations you want to apply:
spring.flyway.enabled=true
# Default location already uses {vendor}
# spring.flyway.locations=classpath:db/migration/{vendor}
# AWE will migrate all listed modules on the configured datasource
# (Using the customized FlywayMigrationConfig)
awe.database.migration-modules=AWE,SCHEDULER,NOTIFIER