Class ActiveModules
java.lang.Object
org.springframework.modulith.runtime.flyway.ActiveModules
- All Implemented Interfaces:
MigrationFilter
A
MigrationFilter that inspects a ModuleTestExecution for which modules are actually active and
signals that only migrations for those are supposed to be executed.- Since:
- 2.1
- Author:
- Oliver Drotbohm
-
Field Summary
Fields inherited from interface org.springframework.modulith.runtime.flyway.MigrationFilter
USE_ALL -
Constructor Summary
ConstructorsConstructorDescriptionActiveModules(BeanFactory factory) Creates a newActiveModulesinstance for the givenBeanFactory -
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
-
ActiveModules
Creates a newActiveModulesinstance for the givenBeanFactory- Parameters:
factory- 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.
-