I want to be able to use my application through the command line. More specifically the behavior that I want to implement is this one :

If in the command line I enter the command create I want the method `generateMigrationFile` to be called, else if the command I entered was run I want to run my migrations(`SpringApplication.run` method). How can I achieve this?

My application main class
-------------------------

```
    public static void main(String[] args) {

        //if entered the command run in the command line
        //SpringApplication.run(MigrationsApplication.class, args);

        //if entered the command create in the command line
        MigrationGenerator generator=new MigrationGenerator();
        try {
            generator.generateMigrationFile("TEST");
        } catch (IOException e) {
            System.out.println("There was an error generating the file");
        }

```

I want to call it like :

`migrationsApp run`

`migrationsApp create`