Spring boot - disable Liquibase at startup

前端 未结 6 1918
一生所求
一生所求 2021-02-05 00:45

I want to have Liquibase configured with my spring boot aplication, so I added dependencies to pom.xml and set the path to master.xml in application.properties. This works fine

6条回答
  •  一个人的身影
    2021-02-05 01:02

    I faced an issue where I wasn't able to disable Liquibase from properties for some reason, so this is how I disabled Liquibase with @Bean annotation:

    @Bean
    public SpringLiquibase liquibase() {
      SpringLiquibase liquibase = new SpringLiquibase();
      liquibase.setShouldRun(false);
      return liquibase;
    }
    

提交回复
热议问题