Class HasMigrationFiles
java.lang.Object
org.springframework.modulith.runtime.flyway.HasMigrationFiles
- All Implemented Interfaces:
MigrationFilter
A
MigrationFilter that checks whether an ApplicationModule declares any
migration files at all.- Since:
- 2.1
- Author:
- Oliver Drotbohm
-
Field Summary
Fields inherited from interface org.springframework.modulith.runtime.flyway.MigrationFilter
USE_ALL -
Constructor Summary
ConstructorsConstructorDescriptionHasMigrationFiles(ResourcePatternResolver resolver) Creates a newHasMigrationFilesMigrationFilter. -
Method Summary
Modifier and TypeMethodDescriptionbooleanshouldMigrate(ApplicationModuleIdentifier identifier, org.flywaydb.core.Flyway flyway) Whether to execute the migration for the givenApplicationModuleIdentifier.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.modulith.runtime.flyway.MigrationFilter
and
-
Constructor Details
-
HasMigrationFiles
Creates a newHasMigrationFilesMigrationFilter.- Parameters:
resolver- must not be null.
-
-
Method Details
-
shouldMigrate
public boolean shouldMigrate(ApplicationModuleIdentifier identifier, org.flywaydb.core.Flyway flyway) Description copied from interface:MigrationFilterWhether to execute the migration for the givenApplicationModuleIdentifier.- Specified by:
shouldMigratein interfaceMigrationFilter- Parameters:
identifier- will never be null.flyway- will never be null.
-