Update 68.5.2. Execute Liquibase database migrations on startup.md

master
qibaoguang 2015-04-06 00:17:49 +08:00
parent dd5e9b4d53
commit 3848df48af
1 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,7 @@
### 68.5.2. 启动时执行Liquibase数据库迁移
想要在启动时自动运行Liquibase数据库迁移你需要将`org.liquibase:liquibase-core`添加到classpath下。
主改变日志master change log默认从`db/changelog/db.changelog-master.yaml`读取,但你可以使用`liquibase.change-log`进行设置。详情查看[LiquibaseProperties](http://github.com/spring-projects/spring-boot/tree/master/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/liquibase/LiquibaseProperties.java)以获取可用设置比如上下文默认的schema等。
这里有个[Liquibase示例](http://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-liquibase)可作为参考。