Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flyway is not injected in SubCommand #14

Open
mtami-allstate opened this issue Jun 17, 2020 · 1 comment
Open

Flyway is not injected in SubCommand #14

mtami-allstate opened this issue Jun 17, 2020 · 1 comment

Comments

@mtami-allstate
Copy link

On the spring boot startup I get the following error

Parameter 0 of constructor in com.aaa.SpringBootApp$FlywayCommand$MigrateCommand required a bean of type 'org.flywaydb.core.Flyway' that could not be found.

    @Component
    @Command(name = "migrate")
    static class MigrateCommand implements Runnable {

        private final Flyway flyway;

        public MigrateCommand(Flyway flyway) {
            this.flyway = flyway;
        }

Am I mssing something in terms of config?

@remkop
Copy link

remkop commented Jun 17, 2020

Can you take a look at the example in the https://github.com/remkop/picocli/tree/master/picocli-spring-boot-starter README and see if that answers your question?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants