Spring boot - disable Liquibase at startup

前端 未结 6 1906
一生所求
一生所求 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 00:59

    If you want to run Liquibase manually, you could use the liquibase maven plugin. Just add something like this to your pom.xml:

      
        org.liquibase
        liquibase-maven-plugin
        ${liquibase.version}
        
          src/main/liquibase/master.xml
          src/main/liquibase/liquibase.properties
          false
        
      
    

    You can take a look at the plugin documentation for the configuration details.

    And don't use the liquibase support from Spring Boot, as it is only meant to be used in runtime. Just remove the liquibase starter and/or any related dependencies as you'll only need the maven plugin.

提交回复
热议问题