Class LocationParser

java.lang.Object
org.flywaydb.core.api.locations.LocationParser

public class LocationParser extends Object
Parses location descriptors (e.g. `filesystem:migrations`) Note that a location is no longer just a place to read migrations from, but an abstraction for any resource or resource folder It can be used for different configurations - e.g. where to read migrations from, where to read callbacks from, where to write output files to
See Also:
  • Constructor Details

    • LocationParser

      public LocationParser()
  • Method Details

    • parseLocation

      public static Location parseLocation(String descriptor)
      Parses a location descriptor as provided in flyway configuration Validates that the location type, as defined by the prefix, can be handled Handles wildcard location parsing Normalizes the location path For a known location with no wildcards, the location can instead be constructed directly using Location.fromPath(String, String)
      Parameters:
      descriptor - the descriptor to parse (e.g. `filesystem:migrations`)
      Returns:
      the parsed location - the prefix will always be set, and the path will be normalized
    • parseLocation

      public static Location parseLocation(String descriptor, String defaultPrefix, org.flywaydb.core.internal.scanner.ReadOnlyLocationHandler... additionalLocationHandlers)