1 | initial version |
To run the migrator with a custom marshaller using a whitelist, follow these steps:
Define the whitelist of entities that should be migrated by creating a file whitelist.txt
that contains the fully-qualified class names of the entities to be migrated, one per line.
Implement a custom marshaller that can handle the entities you want to migrate. For example, you can create a class MyMarshaller
that implements the Marshaller
interface and overrides the marshall
and unmarshall
methods as necessary.
Create a configuration file for the migrator. The configuration file should specify the source and destination databases, the custom marshaller, and the whitelist. Here's an example configuration file:
sourceDbUrl=jdbc:mysql://localhost:3306/source
sourceDbUser=root
sourceDbPassword=
destDbUrl=jdbc:mysql://localhost:3306/dest
destDbUser=root
destDbPassword=
marshaller=com.example.MyMarshaller
whitelistPath=/path/to/whitelist.txt
java -jar migrator.jar /path/to/config.properties
This will migrate the entities specified in the whitelist using your custom marshaller.